5.6.8 Examples
Read the exception status byte from the device with address 1:
01 07 41 E2
01 Device address
07 Function code,
04 = read exception status
A typical response from the device is as follows:
01 07 03 62 31
01 Device address
07 Function code
03 Exception status byte
62 31 CRC
Request the first 12 registers from device with address 1:
01 04 00 00 00 0C F0 0F
01 Device address
04 Function code, 04 = read input register
00 00 Starting address
00 0C Number of registers = 12
F0 0F CRC
A typical response from the device is as follows: *note these are the older register definitions
01 04 18 00 00 03 E8 00 00 7A 02 6C 62 00 00 41 BA 87 F2 3E BF
FC 6F 42 12 EC 8B 4D D1
01 Device address
04 Function code
18 Number of data bytes = 24
00 00 03 E8 Serial number = 1000 (unsigned long)
00 00 7A 02 Totalizer = 31234 lb (unsigned long)
6C 62 00 00 Totalizer units ="lb" (string, unused characters
are 0)
41 BA 87 F2 Mass flowrate = 23.3164 lb/sec (float)
3E BF FC 6F Volume flowrate = 0.3750 ft3 /sec (float)
42 12 EC 8B Pressure = 36.731 psi a (float)
4D D1 CRC
An attempt to read register(s) that don't exist
01 04 00 00 00 50 F1 D2
01 Device address
04 Function code 4 = read input register
00 00 Starting address
00 50 Number of registers = 80
F0 36 CRC
IM-P339-06 MI Issue 2
97