Modbus Datasource

This section will demonstrate the configuration set up of a datasource using the Modbus messaging protocol. For more information, please visit the Modbus Datasource section of the System Documentation.

Creating a Modbus Datasource

  1. Select the appropriate Connector in the I/O Model and right-click. Select Admin  New  External Interfaces  Datasource from the context menu. In the Create Object wizard, enter a name for your Datasource and, optionally, an Object Description. Click Next.

    modbus datasource common
  2. On the Server Type page, click on the drop down menu and select Modbus.

    modbus datasource servertype selection
  3. Select the Communication Type according to your Modbus server configuration. The system supports two communication types for Modbus: 'Modbus TCP/IP' and 'RTU over TCP/IP'. For more information, please visit the Modbus documentation.

    modbus datasource communicationtype selection

    Both communication types require the same configuration options:

    modbus datasource servertype configuration
    • Host Name or IP address of the Modbus device. (Mandatory field)

    • Remote Port for the Modbus connection. Port number 502 is the default port for Modbus.

    • Unit Identifier (in the Modbus documentation this is also referred to as 'Slave ID') This field is used for routing purposes when addressing a device on a MODBUS+ or MODBUS serial line sub-network. Modbus messaging on TCP/IP implementation guide recommends to use 0xFF for a device itself, however it depends on the vendor’s specification. On the serial line the values can be from [1, 247], 0 is a broadcast value.

      For more details please refer to a vendor’s manual and the Modbus messaging on TCP/IP implementation guide.
    • Connection Timeout - In case of a communication error the system will wait for a response for the number of milliseconds.

  4. Click Create to create the datasource in the I/O Model.

Browse functionality is not available for this type of device, therefore objects under this Datasource will have to be created manually as IO-Items. For a step-by-step guide see Accessing Modbus Data.

Slowly Starting Modbus Datasources

If establishing a new connection between the a Modbus Datasource object and the external datasource leads to the system collecting invalid data (e.g. zeros) in the beginning, the subscription can be postponed for a defined amount of seconds after establishing the initial connection.

To do this, navigate to the Server Type > Client Options subsection of the Datasource object properties and set the Subscription Pause property to the adequate number of seconds for this connection.

Setting the Datasource Subscription Pause
Figure 1. Setting the Datasource Subscription Pause

The Remaining Subscription_Pause property is for information only. When new connection is established, a count-down of the time remaining before the subscription starts is displayed.

_Remaining Subscription Pause_ for a newly established connection
Figure 2. Remaining Subscription Pause for a newly established connection_