Modbus Communication - Modbus Rtu - ICPDAS GW-7238D User Manual

J1939 to modbus tcp server / rtu slave gateway
Table of Contents

Advertisement

5.3 Modbus Communication – Modbus RTU
Set J1939 output data
Using the Modbus command as below:
FC16 Write multiple registers (4xxxx) for AO
[Request] (Request by Modbus master device)
Byte 0:
Byte 1:
Byte 2-3:
Byte 4-5:
Byte 6:
Byte 7-(B+6):
Byte (B+7)-(B+8): Value for the CRC calculation
[Response] (Response from the GW-7238D)
Byte 0:
Byte 1:
Byte 2-3:
Byte 4-5:
Byte 6-7:
Example:
In the address 40001, write the value in 0x1234.
[Request Command] (Byte0, Byte1... Byten) (Hex)
01 10 00 00 00 01 02
GW-7238D's response is OK.
[Response] (Byte0, Byte1... Byten) (Hex)
01 10 00 00 00 01 01 C9
GW-7238D J1939 to MBTCP Server / MBRTU Slave Gateway User's Manual (Ver.1.0, Nov. 2011) --- 44
Net ID (Station number)
FC=10 (Hex)
Reference number
Word count
Byte count (B=2 x word count)
Register values
Net ID (Station number)
FC=10 (Hex)
Reference number
Word count
Value for the CRC calculation
12 34
AB 27

Advertisement

Table of Contents
loading

Table of Contents