Enron Modbus Read Boolean Variables (FC01)
Function Code 01
Request
This command is requesting the ON/OFF status of boolean variables # 1020 to 1056
from the slave with address 17.
11 01 03FC 0025 3F35
11: The SlaveID
(11 hex = address 17 )
01: The Function Code (read Boolean variables)
03FC: The Data Address of the first boolean to read.
(1020 = 03FC hex)
(
03FC hex = 1020 decimal
)
0025: The total number of booleans
requested. (25
hex = 37, inputs 1020 to 1056 )
3F35
: The CRC (cyclic redundancy check) for error checking.
Response
11 01 05 CD6BB20E1B 45E6
11: The SlaveID
(11 hex = address 17 )
01: The Function Code (read Boolean variables)
05
: The number of data bytes to follow (37 Coils / 8 bits per byte = 5 bytes)
CD: Boolean variables 1027 - 1020
(1100 1101)
6B: Boolean variables 1035 - 1028
(0110 1011)
B2: Boolean variables 1043 - 1036
(1011 0010)
0E: Boolean variables 1051 - 1044
(0000 1110)
1B
: 3 space holders & Boolean variables 1056 - 1052 (
0001 1011)
45E6
: The CRC (cyclic redundancy check).
The more significant bits contain the higher boolean variables.
For example, The third data byte in the response is
B2
It shows the first (most significant) bit for boolean 1043 is on (
1)
and the last (least significant) bit for boolean 1036 is off (
0).
Due to the number of boolean requested, the last data byte
1B
contains the status of only 5 booleans.
The first three (most significant) bits in this byte are filled in with zeroes.