19 Modbus
The C500 supports a fully featured Modbus implementation which exposes most legacy serial communication
commands (see Section 21.2) as Modbus registers.
The following Modbus protocols are supported:
Modbus ASCII: Available on the USB host serial port. This requires a user supplied USB serial cable
(see Section 10.2). MB.ASCI must be selected in SERIAL:SER.HST:TYPE (see Section 5.5). In addition
baud rate and bit settings may need to be configured.
Modbus RTU: Available on the USB host serial port. This requires a user supplied USB serial cable (see
Section 10.2). MB.RTU must be selected in SERIAL:SER.HST:TYPE (see Section 5.5). In addition baud
rate and bit settings may need to be configured.
Modbus TCP: Available on the Ethernet port. The TCP port listening for connections can be configured
via SERIAL:MOD.OPT:PORT (see Section 5.5).
For legacy 5000 replacement installations using Modbus, please refer to the legacy modbus documentation (see
Section 22).
The details of underlying communications protocol are generally looked after by the PLC directly. Please refer
to the offical Modbus documentation available from http://modbus.org/specs.php for more information on the
protocol.
Registers listed below refer to the Modbus Data Model (MDM), which offsets each register by one in relation
to the Protocol Data Unit (PDU). Most PLCs will use MDM to specify registers, whilst PDU is used for the
underlying data transfer. For an explanation of these terms, please refer to the Modbus protocol documentation
available via the URL above.
Warning!
Be sure to correctly configure the indicator address in SERIAL:NET.OPT:ADDRES.
The indicator will not reply to messages that do not match its address.
19.1 Register Sizes
When accessing parameters that span more than a single Modbus register (16bits), the read or write MUST
consist of sufficient Modbus registers to accomodate the data. If the read or write does not contain enough
registers, the indicator will return a Modbus error.
When reading an SINT32 or UINT32, the read or write must consist of two 16bit Modbus registers. For
example, when reading the displayed weight (register 6201), two Modbus registers must be read (6201
and 6202).
When reading a STR(size), the read or write must consist of ((size + 1) / 2) Modbus registers. For
example, when reading the unit ID (register 6101), ((15 + 1) / 2) = 8 Modbus registers must be read
(6101 to 6109). The first 15 bytes will be the register data, and the last byte will be zero. When writing
a string register, unused bytes should be set to zero. In the register table, strings are given a length in
bytes in the following way: STR(bytes).
It is possible to read more than one sequential registers in a single read or write.
19.2 Modbus Holding Registers
The following Modbus functions are implemented for holding registers:
Read holding registers (function code 0x03)
Write single register (function code 0x06)
Write multiple registers (function code 0x10)
95 C500-600-2.0.3