Configuring a Generic Device on the Modbus TCP IOScanner

Overview

To configure a generic device added on the Modbus TCP IOScanner, complete the parameters in these two tabs:

oModbus TCP Slave Configuration

oIO Scanner Channel Configuration

Modbus TCP Slave Configuration Tab

Step

Action

1

In the Devices tree, double-click Generic_Modbus_TCP_Slave.

Result: The configuration window is displayed.

G-SE-0031832.1.gif-high.gif

 

 

2

Enter a Slave IP Address value (by default 192.168.0.1).

3

Enter a Health Timeout (ms) value (by default 1000).

This represents the delay (in ms) between a request of the Modbus TCP IOScanner and a response from the slave. When the health timeout expires, the associated health bit values change to 0. Health bit values can be visualized in the IOScanner I/O Mapping tab.

IO Scanner Channel Configuration Tab

Step

Action

1

Click the IO Scanner Channel Configuration tab:

G-SE-0031833.1.gif-high.gif

 

 

2

To remove a channel, select it and click Delete.

3

To change the parameters of a channel, select the channel and click Edit.

4

To add a channel, click Add Channel.

This dialog box is displayed:

G-SE-0031834.1.gif-high.gif

 

 

5

In the Channel area, you can define:

oName: optional string for naming the channel

oUnit-ID [1..255]: unit ID of the Modbus TCP slave device (by default 255). See note.

oRepetition Rate: polling interval of the Modbus request (by default 20 ms)

oComment: optional field to describe the channel

oFunction Code: type of Modbus request:

oRead/Write Multiple Registers (Function code 23) (by default)

oRead Holding Registers (Function code 03)

oWrite Multiple Registers (Function code 16)

In the READ register area, you can define:

oOffset: starting register number to read from 0 to 65535

oLength: number of the registers to be read (depending on the function code).

oError Handling: define the fallback value in the case of a communication interruption:

oKeep Last Value (by default) holds the last valid value

oSetToZero resets all values to 0

In the WRITE register area, you can define:

oOffset: starting register number to write from 0 to 65535

oLength: number of the registers to be written (depending on the function code).

6

Click OK to validate the configuration of the channel.

7

Repeat steps 4 to 6 to create other channels that define the Modbus communication with the device. For each Modbus request, you must create a channel.

NOTE: Unit identifier is used with Modbus TCP devices which are composed of several Modbus devices, for example, on Modbus TCP to Modbus RTU gateways. In such case, the unit identifier allows reaching the slave address of the device behind the gateway. By default, Modbus/TCP-capable devices ignore the unit identifier parameter.