Modbus configuration. ELPRO 415U-E CONDOR SERIES, 415U-2 CONDOR SERIES, 415U-2
Annonce
Annonce
User Manual MN032006EN
Effective May 2018
415U Condor-long-range wireless I/O and gateway
Modbus configuration
The 415U provides Modbus TCP client/server and Modbus RTU master/slave functionality for I/O transfer. Modbus TCP client,
Modbus RTU master, and Modbus TCP server/RTU slave can all be supported simultaneously. When combined with the built-in Modbus
TCP-to-RTU converter, the 415U can transfer I/O to and from almost any combination of Modbus TCP or RTU devices.
The 415U has predefined data areas for inputs and outputs and the different I/O types (bits, words, long, floats, and so on), which include the onboard input/outputs and are shared for both client and server. For a full list of the available I/O and address locations see .
To change Modbus configuration parameters, click
Modbus
in the project tree. The Modbus configuration screen (
arranged in tabs. The main tabs are:
•
Modbus TCP Server and RTU Slave
—Used for configuring
Modbus TCP Server or RTU Slave parameters.
•
Modbus TCP Client and RTU Master
—Used for any Modbus
TCP Client and Modbus RTU Master Configuration parameters.
Figure 57. Modbus configuration
Modbus Master TCP
Client and RTU Master
Scan Rate
Used to enable the Modbus master TCP client and RTU master. When this is disabled the screen appears as in
.
Allows you to adjust the Modbus polling scan rate. The scan rate is the delay between the completion of one request and the initiation of the next request.
Figure 58. Modbus master TCP client and RTU master disabled
34 EATON
www.eaton.com
415U Condor-long-range wireless I/O and gateway
Modbus TCP server and RTU slave tab
Click this tab in the Modbus configuration screen to change parameters for the Modbus TCP server or RTU slave (see
User Manual MN032006EN
Effective May 2018
Figure 59. Modbus TCP server and RTU slave tab
Modbus
TCP Server enabled
Device ID
Allows the 415U to accept connections from one or more Modbus TCP clients via Ethernet or RTU masters via the RS-485 or RS-232 serial interfaces. All
Modbus transactions routed to the on-board Modbus
TCP server/RTU slave are directed to/from the on-board general purpose I/O registers.
The Modbus TCP server is shared with the Modbus
TCP to RTU converter, so that the Modbus device
ID is used to determine if a Modbus transaction is to be routed to the on-board Modbus TCP server or to a Modbus RTU device connected to the serial port. Care should be taken to ensure that all serially connected Modbus devices use different device IDs
(for example, Modbus slave address), and the device
ID is different than the onboard device ID. Up to 32 separate connections to the Modbus TCP server are supported.
The device ID for the modules own Modbus server/ slave. This is the ID that any external Modbus client or Modbus master would require to allow it to read values from the internal Modbus registers (for example, if a DCS or SCADA computer needs to poll the 415U via TCP or serial connection).
Figure 60. Modbus TCP client and RTU master tab
The Modbus TCP Client and RTU Master tab contains the following subtabs.
Modbus TCP
Client
RTU Master
RS-232 Modbus
Parameters
Allows you to configure the Modbus client mappings to communicate with remote TCP devices. Modbus TCP client functionality allows connections to a maximum of 24 different
Modbus TCP servers, and up to 100 mappings can
be configured. For more information, see “Adding mapping parameters” on
Allows you to configure Modbus RTU mappings to communicate with remote serial Modbus devices.
For more information, see “Adding mapping parameters” on
.
Shows the configuration parameters for RS-232
ports. See “RS-232/RS-485 Modbus parameters” on
RS-485 Modbus
Parameters
Shows the configuration parameters for RS-485
ports. See “RS-232/RS-485 Modbus parameters” on
All Modbus mappings are directed to and from the onboard I/O registers, depending on configuration (see the following section).
Modbus TCP client and RTU master tab
Click this tab in the Modbus configuration screen to set the Modbus client scan rate, which is common to both the Modbus TCP client
). The default rate is
1000 msec. Each mapping is configured with a response timeout, which is the period of time that the master will wait for a response before indicating the failure on the Comms Fail Register.
EATON
www.eaton.com
35
User Manual MN032006EN
Effective May 2018
415U Condor-long-range wireless I/O and gateway
Adding mapping parameters
Before adding or modifying a module’s TCP or RTU mappings, make sure that the Modbus Master TCP Client and RTU Master checkbox is selected at the top of the Modbus configuration screen (see
). Click the Modbus TCP Client or the RTU Master subtab,
depending on the connected device. Then, click
Add
to add a new mapping,
Edit
to edit a selected mapping, or
Delete
to delete a selected mapping. Clicking Add or Edit displays the screen in
, where you can specify mapping parameters.
Both Modbus TCP client and RTU master mappings have similar parameters, the only difference will be the slave communication path. For example, Modbus TCP client mappings will use a network address and port while RTU master mappings will use a serial port.
Figure 61. Modbus TCP client mapping
Local Register (Master) When the Function Code Modbus command is “Read” the Local Register field will be the destination register(output location) on the local device. When the Function Code command is“Write” the Local
Register field will be the originating register (input location) on the local device.
The number of consecutive I/O values in the mapping.
I/O Count
Function Code (Command Type) The Function Code Modbus command determines if the command will be “Read” or “Write” and what type of register will be used. When entering a mapping, you need to select “Read” or “Write” from the drop-down list in the Command Type field, and then select one of the four radio buttons representing the register types. Selecting the register type will change the Destination (slave) register address range to a suitable range.
Destination Register (Slave) The register location on the TCP server/RTU slave device. The register selection offered will be appropriate for the Modbus command selected in the Command field.
Device ID
Server IP Address
Network Address
The unit address (device ID) of the Modbus TCP server or Modbus RTU slave.
(TCP client only.) The IP address of the Modbus TCP server.
Server Port (TCP Client only)
Serial Port (Modbus RTU only)
Response Time
Fail Reg
The server port of the slave device, Modbus TCP will usually be the standard port address of 502.
This is the serial port used to connect to the device. Select the port from the drop-down list.
The amount of time the TCP client or Modbus master waits for a response from a TCP server or an RTU slave device before registering a Communications Fail.
The Comms Fail indication register can be a physical output, such as DIO #1–8 (Reg 1-8), which will turn on a digital output when in fail. It can also be configured as an internal holding register (Reg 30501), which will show the fail indication as well as any Modbus error codes. This is useful for diagnosing
communication problems. For Modbus error code descriptions, see “Modbus error codes” on
.
36 EATON
www.eaton.com
415U Condor-long-range wireless I/O and gateway
Modbus TCP mapping examples
, the first mapping (#1) shows the
Modbus client (master) is configured to read analog values from a device connected on the LAN. The mappings function code is
“Read” and is reading a count of four values (analogs) from the
Ethernet address 192,168.0.17, device ID #10, starting at address
User Manual MN032006EN
Effective May 2018
30001, and then writing these values into its own local registers, starting at 40501. The server port is 502, which is a standard Modbus
TCP port address. If the mapping fails to communicate to the TCP server, it will write a value of “1” into local register 508, indicating a communications failure.
Figure 62. Modbus TCP mapping table
The second mapping (#2) shows something similar, but instead of analog values, the values are digital. The Function code is “Read” from IP address 192.168.0.17 and device ID #10. It will read eight values starting from address 10001, and write them to the local address, starting at 501. Again, it is using the same server port of
502. If the mapping fails to communicate to the TCP server, it will write a value of “1” into local register 507, indicating that mapping failed to communicate.
The third mapping (#3) is similar to the second mapping, but instead of reading from the local Ethernet subnet (LAN) it is reading from an IP address on the radio network (another 415U module). The
Function code is “Read” from IP address 192.168.10.101 and device
ID #1. It will read four values, starting from address 10001, and write them to the local address, starting at 509. A Comms Fail register is configured at local register 506.
The fourth mapping (#4) is configured to write the values from the local analog input #1 and #2 across to a TCP server at IP address
192.168.0.17. It will write the values into the destination address
40001 and 40002 at device ID of 10. It is using the TCP server port
502 and is configured with a response time of 1000 msec. If it fails to communicate, it will turn on local register 505.
Modbus RTU master
Modbus RTU functionality allows connections to Modbus RTU slave devices via the RS-232 or RS-485 ports. Up to 100 mappings can be configured. All Modbus mappings are directed to or from the onboard I/O registers depending on the configuration (described below). The Modbus RTU master polls the slave devices via the serial port configured in the mappings.
Modbus RTU (serial) devices can also be polled if connected to remote 415U serial ports. To enable this feature the remote 415U-2 serial port must be set to “Modbus RTU Master” mode and the
TCP mappings must reflect the correct server IP address and port number of the remote 415U. Polling TCP servers or RTU slaves over the radio network will greatly increase radio communications and is not recommended for busy systems.
Example
The Modbus RTU mapping is very similar to the Modbus TCP mapping except that the destination is a serial interface instead of an
Ethernet address and port.
, the first mapping (#1) shows a read mapping from a serial device connected on the RS-485 port with a device ID of 5. It is reading one I/O point, starting at remote address
30001, and writing the value into the local address 40501. It is configured with a response timeout of 1000 msec, and local register
508 will indicate a failure to communicate with this device.
Figure 63. Modbus RTU example
The second mapping (#2) shows a read mapping from a serial device connected on the RS-485 port with a device ID of 5. It is reading
16 I/O points, starting at remote address 10001, and writing the value into the local address 501. It is configured with a response timeout of 1000 msec, and local register 507 will indicate a failure to communicate with this device.
The third mapping (#3) is a write mapping that will write the local battery voltage (Reg 30007) to register 40001 on a serial device connected on the RS-232 with a device ID of 6. Again, the response timeout is 1000 msec, and it has a communications fail register of 506.
EATON
www.eaton.com
37
User Manual MN032006EN
Effective May 2018
Figure 64. Operating mode error
Note
: MConfig will indicate whether the serial port “Operating Mode” is not set, or set to the wrong mode. To change the mode, click the RS-232 or
RS-485 Modbus Parameter tab
.
RS
-
232/RS
-
485 Modbus parameters
The RS-232 and RS-485 Modbus Parameters tabs show the configuration parameters for the RS-232 and RS-485 ports. These parameters are exactly the same as the serial parameters described
displayed under the Modbus tab for convenience.
415U Condor-long-range wireless I/O and gateway
Figure 65. Modbus parameters
38 EATON
www.eaton.com
Download
Annonce