FL4000
40
4.5 Supported Function Codes
The FL4000 supports the following function codes:
•
Function Code 03 (Read Holding Registers) is used to read status from the slave unit.
•
Function Code 06 (Preset Single Register) is used to write a command to the slave unit.
4.6 MODBUS Read Status Protocol (Query / Response)
A master device reads registers from the FL4000 by sending an 8-byte message (Table 24).
Table 24: MODBUS Read Register(s) Request
Byte
MODBUS
Range
Referenced to FL4000
1
st
Slave Address
1-247
*
(Decimal)
FL4000 ID (Address)
2
nd
Function Code
03
Read Holding Registers
3
rd
Starting Address Hi
00
Not Used by the FL4000
4
th
Starting Address Lo
00-44 (Hex)
FL4000 Commands
5
th
Number of Registers Hi
00
Not Used by the FL4000
6
th
Number of Registers Lo
**
01 – 45 (Hex)
Number of 16 Bit Registers
7
th
CRC Lo
00-FF (Hex)
CRC Lo Byte
8
th
CRC Hi
00-FF (Hex)
CRC Hi Byte
*
Address 0 is reserved for Broadcast Mode and is not supported at this time.
**
A maximum of 69 registers can be requested during a single block of time.
Upon receiving a valid read register request from the master device, the FL4000 will respond
with a message (Table 25). If the query generates an error, an exception message is returned
to the master device (Section 4.8 ).
Table 25: MODBUS Read Register(s) Response
Byte
MODBUS
Range
Referenced to FL4000
1
st
Slave Address
1-247* (Decimal)
FL4000 ID (Address)
2
nd
Function Code
03
Read Holding Registers
3
rd
Byte Count **
02 – 8A (Hex)
Number of Data Bytes (N
+
)
4
th
Data Hi **
00-FF (Hex)
FL4000 Hi Byte Status Data
5
th
Data Lo **
00-FF (Hex)
FL4000 Lo Byte Status Data
:
:
:
:
:
:
:
:
N
+
+4
CRC Hi
00-FF (Hex)
CRC Hi Byte
N
+
+5
CRC Lo
00-FF (Hex)
CRC Lo Byte
*
Address 0 is reserved for Broadcast Mode and is not supported at this time.
**
Byte count and the number of returned data bytes depends on the number of requested
registers.
+
N denotes the number of returned data bytes.