- Addr STRING for ASCII Address Format
For ASCII addressing, only the communication port number is requested:
‘<communication port number>’
For example, to send a user defined message on serial line 2, use the string ‘2’
- Addr STRING for Modbus Serial Address Format
For Modbus serial addressing, use the communication port and the destination slave address (0 to 247), separated by a dot: ‘<communication port number>.<slave address>’
For example, send a message to slave 8 on serial line 2 with this syntax: ‘2.8’
- Addr STRING for Modbus TCP Address Format
a) Address of a Modbus TCP Standard Slave
For the Modbus TCP standard slave address format, the communication port number (3 for the embedded Ethernet port) and the destination IP address {A.B.C.D} (offset with brackets) are requested:
‘<communication port number>{<IP address A.B.C.D>}’
For example, to send a message at Modbus TCP slave IP address 192.168.1.2 using standard TCP port 502, use this string:
‘3{192.168.1.2}’
b) Address of a Modbus Serial Slave Through Ethernet/Serial Line Gateway
The request includes the communication port number, gateway IP address {A.B.C.D} (offset with brackets with or without TCP port), and the Modbus serial slave address (UnitId parameter):
‘<communication port number>{<IP address A.B.C.D>}<slave address>’
For example, to send a message at Modbus Serial slave address 5 through a Ethernet/serial line gateway at IP address 192.168.1.2 using standard TCP port 502, use this string:
‘3{192.168.1.2}5’