Modbus RTU Mappings Example
The system in Figure 41 shows that Unit B is a Modbus RTU master that is configured to poll the RTU slave device
at Unit A via the serial interface and read the status of eight onboard I/O registers, which will then be reflected to
eight local I/O registers at Unit B.
Figure 41 Modbus Example
Figure 42 shows the serial configuration for Unit B:
•
Modbus RTU Master needs to be selected as the Port Type of the serial port that will be used to communicate
with the slave device.
•
The serial data rate, data format and flow control need to match that of the device and then the scan rate and
response time need to be appropriate for the application.
•
The scan rate in this example is set for 1 second and it will also wait 1 second for a response from the slave
before flagging a Comms Failure.
Figure 42 Modbus RTU Serial Port Configuration
Because the Unite B module is also communicating with a Modbus RTU slave device (Device #5) it will need to have
an RTU Master Mapping configured. In the RTU mapping example in Figure 43, Unit B Modbus RTU mapping is
configured to read 8 x discrete values starting at register 501 from a Modbus slave device ID #5 connected to the
RS-232 port and store the values at its own local internal register 501.
•
Local Register (501) specifies a general purpose Bit Storage area in the local module (Unit B).
•
I/O Count (8) specifies that it is passing 8 I/O points.
•
Function Code
“02: Read Discretes” specifies the standard Modbus function code to read a digital input.
•
Destination Register (501) specifies the register location on the remote Modbus RTU Slave (Unit A).
•
Device ID (5) is the Device ID of the Modbus RTU Slave at Unit A.
•
Comms Fail Register (509) is the local Register location that will indicate a communication failure for this
mapping.