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.
For information on the latest version, please have a look at GL013301.
WRITE_MODBUS_RTU_DATA
This is a structure information to define Modbus RTU write configuration, used for transmitting data to external Modbus slave devices via serial communication (RS-485/RS-232).
BYTE# |
Field Name |
Data Type |
Value |
Remarks |
|---|---|---|---|---|
0 |
|
|
Symbol name (32-byte identifier) |
|
32 |
|
|
Serial (TTY) port name (e.g., |
|
48 |
|
|
Slave device ID (1–255) |
|
52 |
|
|
Baud rate (e.g., 9600, 115200) |
|
56 |
|
|
Data bits (7 or 8) |
|
60 |
|
|
Parity (N/E/O) |
|
61 |
|
|
Stop bits (1 or 2) |
|
65 |
|
|
Register type |
|
66 |
|
|
Register address (index) |
|
68 |
|
|
Register value (0-65535) |
Total size: 72 bytes
Defined in: DRFS.h
typedef struct _WRITE_MODBUS_RTU_DATA
{
/* symbol name */
char _szSymbol[MAX_SYMBOL_SIZE];
/* tty device */
char _szttyPort[16];
/* Slave ID*/
int _iSlaveID;
/* Baud Rate */
int _iBaudRate;
/* Byte size */
int _iByteSize;
/* Parity */
char _szParity;
/* Stop bit */
int _iStopBit;
/* i/o type */
unsigned char _iRegType;
/* register address */
unsigned short _iRegIndex;
/* register value */
unsigned short _iRegValue;
} WRITE_MODBUS_RTU_DATA, *LPWRITE_MODBUS_RTU_DATA;