Modbus™ communications, 1 general modbus™ description, 2 modbus™ register map & description – Detcon CX-IR User Manual
Page 26: General modbus™ description, Modbus™ register map & description, Figure 12 modbus™ frame format
Model CX-IR
4. Modbus™ Communications
Model CX-IR sensors feature Modbus™ compatible communications protocol and are addressable via the
operator interface. Communication is two wire, half duplex 485, 9600 baud, 8 data bits, 1 stop bit, and no
parity. If a multi-point system is being utilized, each sensor should be set for a different address. Typical
address settings are: 01, 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F, 10, 11…etc.
Sensor RS-485 ID numbers are factory default to 01 and can be changed in the field using the operator
interface (Section 3.5.5).
4.1 General Modbus™ Description
The Modbus™ communication uses the RTU transmission mode per the Modbus™ specification. The basic
frame format for Modbus™ consists of a Modbus™ address, function code, data and CRC.
Address Field Function Code
Data
CRC
Figure 13 Modbus™ Frame Format
The Modbus ID Field is the unique Modbus™ address of each device on the network. The Function Code is
the function to be performed. The Data contains read or write data and is formatted according to the function
being performed. The CRC (Cyclic Redundancy Code) is used to detect errors in the frame. Frames with errors
are invalid and ignored.
Modbus™ transactions consist of a request by the controller and response from the device being addressed so
there are two frames transferred for every transaction. Every request is evaluated by the CX-IR to determine if
it is addressed, and if it falls within the register address range. If these two conditions are true, the CX-IR will
then verify a valid Function Code. Function Codes supported by the CX-IR are as follows:
• Function Code 03 (03h) – Read Holding Registers
• Function Code 06 (06h) – Write Single Register
• Function Code 16 (10h) – Write Multiple Registers
If an invalid function code is performed, the CX-IR will ignore the request.
4.2 Modbus™ Register Map & Description
When the CX-IR is assigned a Modbus™ address, the following registers become available to the controller
for access. All CX-IR sensors implement this register set. Some registers are Read Only (R) and others are
Read/Write (R/W) as shown by the R/W column. This equates to specific function codes where Read is
function code 03 and Write is function code 06 or 16.
NOTE
A write to a Read Only register is allowed and returns a response, but it does not change the
value of the register.
Table 3 is the register map for the CX-IR sensor and gives a brief description each register or register set. This
information is only meant as a reference. For a more detailed description of the Register Map please contact
Detcon.
CX-IR Instruction Manual
Rev. 1.2
Page 22 of 34