Modbus/TCP Driver - Configuration

Open the configuration panel of Modbus/TCP driver via System Management > Driver > Modbus Driver

Figure 1. System management - Drivers tab

Configure the PLC (remote-control components) in the following configuration panel. Configure each PLC (independent of the real addressing). An internal data point of type _Mod_Plc is created for each PLC (see also Internal data points of the Modbus/TCP driver).

Figure 2. Configuration panel of the Modbus/TCP driver

Create

Creates a new PLC data point with a sequence higher number, e.g. if the last created PLC data point was _Mod_Plc_3, then the name of the new data point is _Mod_Plc_4 and it has the default configuration settings. Afterwards this can be configured. Note that a configuration will apply only when the Apply button has been clicked. For changing the configuration of a PLC data point choose it from the combo box, change the configuration and click on the Apply button to save the new configuration.

Remove

Deletes the chosen data point after confirmation of the security query dialog.

Modbus/TCP Driver Configuration - Common Settings

Active

Tick this check box in order to activate the connection to the PLC. You can deactivate a device that is already created and configured. The device (data point) is not deleted and can be reactivated at any time. The status display changes from "Connected" to "Not Active" if a device is deactivated. If a connection has been deactivated, the driver does not communicate with the corresponding PLC anymore. So it is possible to prevent for example error messages when a PLC is intentionally removed from the system.

Set Invalid Bit

If the checkbox is checked, the invalid bit will be set whenever the connection to the PLC is interrupted. The connection is marked as dead. The invalid bit is set to all input addresses (not output addresses) of the corresponding PLC to which the connection has been lost (="Not connected" status).

Redundant PLC

Choose this option if a redundant PLC exists.

Modbus/TCP Driver Configuration - Device Configuration

PLC number

A specific number of the PLC for the driver (0-65535). This number has to be unique in the system. The PLC number has to be identical to the number in the data point name. In order to create a new data point with a specific number, change the number and click on Apply.

Modbus transaction timeout

The timeout between the request and response in milliseconds (100-100000). In case of timeout the request is lost and connection closed. The connection will be re-established at the next request.

Frame coding

The coding takes alternatively place with TCP (binary) or ASCII.

Unit address

Address of the slave or the Modbus unit (0-255). The unit address is required if several PLCs are connect via a LAN gateway with one IP address. If a PLC has its own IP address, the unit address should be set to 1. Up to 128 PLCs can be configured for one IP address.

Important:

Please be aware that with a lot of PLCs behind one gateway will have a very low performance as these have to be queried in a round-robin base. So the data throughput will be rather low. Imagine you have 100 devices and each has a response time of 100ms. You need 10s to access all the devices. In addition the situation becomes even more problematic if a lot of devices are not connected, because in this case the time out must expire before the next PLC is requested. So in that case the data throughput will degrade significantly.

This is why it is not recommended to have many devices behind the same gateway!

But of course this depends also on the polling requirements. If the requirements are less demanding, i.e. a high poll interval, than this might be no problem. So there is a trade-off between fast polling and many number of devices behind one gateway.

List of Hosts

Define the IP addresses/host names of the PLC or the gateways to the PLC and port numbers for the TCP connections. Maximal 2 connections are allowed.

Modbus/TCP Driver Configuration - Advanced Settings

Timestamp mode

Defines the timestamp mode (with or without milliseconds) for float transformations.

Register endianity

Defines which endianity should be used when reading/writing to a register.

Only active driver

This option defines that only the active driver connects to the PLC. You have to use this option in a redundant WinCC OA system in case of PLCs which can only connect to one Modbus client.

Swapped Bytes

The option defines if the Modbus driver shall swap the bytes of the 16bit Modbus registers (holding and input) for the corresponding connection.

Modbus/TCP Driver Configuration - Redundant PLC

Unit Address

Specify the unit or slave address of redundant PLCs.

List of Hosts (Redundant PLC)

Specify the IP addresses and port numbers for the TCP connections of redundant PLCs (see also List of Hosts above).

Modbus/TCP Driver Configuration - Commands

General Query

Clicking on this button triggers a general query to the PLC. All data that is configured to polling is queried immediately and the GQ bit of the DPE is set. Furthermore, spontaneous data are let through to an address on the related device in the next come in, no matter whether a low level comparison or smoothing is activated. The Modbus/TCP driver does not execute a general query when establishing a connection. The query has to be triggered manually via the internal data point _DriverCommon. The driver, however, executes a general query at a redundancy switch.

If smoothing is activated, data from a general query with same values is only let through, when the internal driver data point "_DriverX.SM" (X is the Modbus manager number) is set to 1.

If your project is configured as a redundant project, data from a general query with same values is only let through by the event manager when the config entry "redOldNewComp" in the event section of the "config.redu"-file is set to 0.

Modbus/TCP Driver Configuration - State

Error code

Number of the last driver error (see also Error codes).

Sent requests

Number of requests sent to the PLC.

Rejected requests

Number of invalid requests received from the PLC.

Received requests

Number of requests received from the PLC. Note that if the driver is a pure master, the number of received requests remains 0 since no requests are received from the PLC.

State

Current connection state. The following states are possible: Not connected (0), Connected (1), General Query (2) and Not active (3).