C1300
Advanced Circular Chart Recorder
4 Modbus Protocol
8
IM/C1300–MOD
Rev. C
4 Modbus Protocol
4.1 Introduction to Modbus Protocol
Modbus communication is based on a master and a slave arrangement. The master sends a message to one slave at a time and
waits for a reply.
The slave cannot accept a new message until the existing message is processed and a reply sent to the master (maximum response
time 250 milliseconds). The slave monitors the elapsed time between receipt of characters. If the elapsed time without a new
character is 3
1
/
2
character times, the slave assumes the next character received is the start of a new message.
To allow the master to differentiate between more than one slave in a system, each slave is given a unique identity address (between
1 and 99).
A broadcast address (address zero) can be used to access all slave devices with one command. This is limited to write messages
only and there is no slave acknowledgment.
4.2 Modbus Function Codes
The function code field instructs the addressed slaves what function to perform. Table 4.1 shows the function codes, their meaning,
and the action they initiate.
Note.
The C1300 operates as a Modbus, Remote Terminal Unit (RTU) slave.
Parity checking – used to detect transmission errors in individual characters.
Cyclic redundancy checking – used to detect errors in the master messages and slave responses.
Non-volatile memory save command.
Note.
Modbus RTU requires 1 start bit, 8 data bits, 1 parity bit (optional) and 1 or 2 stop bits.
Modbus
Function Code
Modbus Message Name
C1300 Definition
01
Read Coil Status
Read up to 16 consecutive discrete (boolean) points from a specific starting point.
The C1300 returns zeros for points which do not contain defined data and NAKs*
any request for point numbers greater than 200.
03
Read Holding Register
Read up to 8 consecutive registers from a specific starting register. The C1300
returns zeros from registers which do not contain defined data and NAKs* any
request for register numbers greater than 250.
05
Force Single Coil
Write one discrete (boolean) point. The C1300 NAKs* this if the point is not
currently writeable.
06
Preset Single Register
Write one register. The C1300 NAKs* if the register is not currently writeable. This
function code also applies to any currently applicable limits to the value before
storage in the database.
08
Loopback Diagnostic Test
Echo the message; only 'Return of Query' is supported.
16
Preset Multiple Registers
Write up to 8 consecutive registers from a specified starting register. The C1300
NAKs* if any of the registers are not currently writeable, but still carries out all the
writes which are valid, applying any currently applicable limits to the value before
storage in the database.
*NAK = Negative Acknowledgement
Table 4.1 Modbus Function Codes