GW-7228 J1939/Modbus RTU Slave Gateway
User’s Manual (Ver 1.3, Apr/2011) ------------- 45
Get J1939 input data
Using the Modbus command as below:
FC4 Read multiple input registers (3xxxx) for AI
[Request] (Request by Modbus master device)
Byte 0: Net ID (Station number)
Byte 1: FC=04
Byte 2-3: Reference number
Byte 4-5: Word count
Byte 6-7: Value for the CRC calculation
[Response] (Response from the GW-7228)
Byte 0: Net ID (Station number)
Byte 1: FC=04
Byte 2: Byte count of response (B=2 x word count)
Byte 3-(B+2): Register values
Byte (B+3)-(B+4): Value for the CRC calculation
Example:
Read a value of one word in the address 30001.
[Request] (Byte0, Byte1... Byten) (Hex)
01 04 00 00 00 01 31 CA
GW-7228 responds a value of one word in the address 30001.
[Response](Byte0, Byte1... Byten) (Hex)
01 04 02
12 34
B4 47