Instruction manual

MODBUS System Set Up
025-9209 31
Within the MODBUS protocol, the Input Status and Input Register signal types (digital and
analog inputs) are read-only. The Coil and Holding Register signal types (digital and analog
outputs) may be both read from and written to.
When configuring the MODBUS master, the MODBUS addresses and value ranges must be
used. Table 15 lists the allowable range values in relation to the signal types.
Table 15. MODBUS Values versus Signal Types
I/O Type MODBUS Value
01
Coil (digital output) OFF (open circuit) N/A ON (grounded)
Input Status
OFF (open circuit
or high voltage)
N/A
ON (ground or low
voltage)
I/O Type MODBUS Value
0 6553 32767
Input Register (analog input) 0 V or 0 mA 1 V or 4 mA 5 V or 20 mA
Holding Register (analog output) 0 V 1 V 5 V
The most common usage for analog inputs and outputs is with transducers that convert some
real world value either into a voltage (in the range 0 to 5V or 0 to 10V) or a current (in the
range 4 to 20mA). Most MODBUS master software packages provide a way to configure
input registers and holding registers so that the conversion from raw units used in the
MODBUS protocol to real world units is done automatically.
Here is an example. A sensor that measures water flow and outputs a current of 4mA for a
flow of 0 gal/min and a current of 20mA for a flow of 100 gal/min. This sensor is connected
to analog input number 5 of a Model 1716 RTU. In the MODBUS master software, input
register 30005 would be configured with a raw range of 6553 (4mA) to 32767 (20mA) and a
real world range of 0 gal/min to 100 gal/min.
USING ACCUMULATORS AND COUNTERS
Configuring the master to be able to access accumulators and counters is more difficult than
for basic RTU I/O, and requires a good working knowledge of the MODBUS master
software package.
Analog input accumulators keep a running total of the analog input value over a period of
time. There is one accumulator for each analog input on the Model 1708 or Model 1716
RTU. Each accumulator consists of three values: the accumulated total (sum of samples from
the analog input), the total number of samples taken, and the sample rate (how often the
analog input is read).
Accumulators are usually used to keep a running total of some flow through a system. For
example, if a sensor measuring flow in gal/min is connected to a Model 1708 RTU, the total
flow in gallons can be tracked through the use of an accumulator. Accumulators can also be
used to calculate the average value of an analog input.