You're reading the documentation for an older, but still supported version (GL013300).
For information on the latest version, please have a look at GL013301.

WRITE_MODBUS_DATA

This is a structure information to define a Modbus TCP write configuration, used for transmitting data from the robot controller to an external Modbus slave device via Ethernet (TCP/IP).

BYTE#

Field Name

Data Type

Value

Remarks

0

_szSymbol

char[32]

Symbol name (32-byte identifier)

32

_szIpAddr

char[16]

Target device IP address (IPv4 string)

48

_iPort

unsigned short

TCP port number (e.g., 502)

52

_iSlaveID

int

Slave device ID (1-255)

56

_iRegType

unsigned char

Register type
0: Coil, 1: Discrete Input
2: Holding Register, 3: Input Register

58

_iRegIndex

unsigned short

Register address (index)

60

_iRegValue

unsigned short

Register value (0-65535)

Total size: 64 bytes

Defined in: DRFS.h

typedef struct _WRITE_MODBUS_DATA
{
    /* symbol name */
    char                        _szSymbol[MAX_SYMBOL_SIZE];
    /* tcp address */
    char                        _szIpAddr[16];
    /* tcp port */
    unsigned short              _iPort;
    /* Slave ID*/
    int                         _iSlaveID;
    /* i/o type */
    unsigned char               _iRegType;
    /* register address */
    unsigned short              _iRegIndex;
    /* register value */
    unsigned short              _iRegValue;

} WRITE_MODBUS_DATA, *LPWRITE_MODBUS_DATA;

typedef WRITE_MODBUS_DATA
    WRITE_MODBUS_TCP_DATA, *LPWRITE_MODBUS_TCP_DATA;