S4000C
8.4 MODBUS Write Command Protocol (Query/Response)
8.4.1 MODBUS Write Query Message
Byte
MODBUS
Range
Referenced to S4000C
1
st
Slave Address
1-247* (Decimal)
S4000C ID (Address)
2
nd
Function Code
06
Preset Single Register
3
rd
Register Address Hi
00
Not Used by S4000C
4
th
Register Address Lo
00-FF (Hex)
S4000C Commands
5
th
Preset Data Hi
00-FF (Hex)
S4000C Hi Byte Command Data
6
th
Preset Data Lo
00-FF (Hex)
S4000C Lo Byte Command Data
7
th
CRC Lo
00-FF (Hex)
CRC Lo Byte
8
th
CRC Hi
00-FF (Hex)
CRC Hi Byte
*NOTE:
Address 0 is reserved for broadcast mode and will not be supported at this time.
**NOTE:
Start Address can be a maximum of 9999 Address Locations (0000-270E)
8.4.2 MODBUS Write Response Message
Byte
MODBUS
Range
Referenced to S4000C
1
st
Slave Address
1-247* (Decimal)
S4000C ID (Address)
2
nd
Function Code
06
Preset Single Register
3
rd
Register Address Hi
00
Not Used by S4000C
4
th
Register Address Lo
00-FF (Hex)
S4000C Commands
5
th
Preset Data Hi
00-FF (Hex)
S4000C Hi Byte Command Data
6
th
Preset Data Lo
00-FF (Hex)
S4000C Lo Byte Command Data
7
th
CRC Lo
00-FF (Hex
CRC Lo Byte
8
th
CRC Hi
00-FF (Hex)
CRC Hi Byte
8.5 Function Codes Supported
Function Code 03 (Read Holding Registers) will be used to read status from the slave unit.
Function Code 06 (Preset Single Register) will be used to write a command to the slave unit.
8.6 Exception Responses and Exception Codes
8.6.1 Exception
Response
In a normal communications query and response, the master device sends a query to the
S4000C and the S4000C receives the query without a communications error and handles the
query normally within the master device’s allowable timeout. The S4000C then returns a normal
response to the master. An abnormal communications query produces one of four possible
events:
1. If the S4000C does not receive the query due to a communications error, then no
response is returned from the S4000C and the master device will eventually process a
timeout condition for the query.
2. If the S4000C receives the query, but detects a communication error (CRC, etc.), then
no response is returned from the S4000C and the master device will eventually
process a timeout condition for the query.
27