Skip to main content
Skip table of contents

Modbus TCP slave

Adding a slave interface

The Ethernet interface must be added to the variTRON that is to be used as a modbus TCP slave via the context menu of the CPU and the Add Device... menu item.

The communication log ModbusTCP Slave Device is then added via the Add Device... menu item in the context menu of the Ethernet devices.

The network interface (LAN port) to be used for communication must be selected on the Ethernet device under General.

Configuring the slave interface

The following parameters can be configured for the Modbus TCP Slave:

Holding register:
The Modbus TCP Master can only write in this register. Also recognisable by the address %IW (Input Word) or in the I/O mapping by the symbol :IOInput: .

Input register:                  
The Modbus TCP Master can only ready from these registers. Also recognisable by the address %QW (Output Word) or in the I/O mapping by the symbol :IOInput:.

In Configured Parameters the number of necessary data words (16 bit) can be entered in the points Holding registers (Input) and Input registers (Output).
In the Data Model field, the start addresses for the Holding register and the Input register can be set.

You can imagine the addressable area as an Excel table that is numbered in ascending order. As the holding register in the example has the start address 0, five memory locations are reserved for input from this address. The start address for Input register has the start address 10 and therefore five memory locations are reserved for Output from this address.

Finally, the required variables are declared in the registers in the Modbus TCP Slave Device I/O Mapping or these are mapped to variables of the application.

In the example, the structure variable stPV_ReadOnly provides the Modbus TCP Master values.
The structure variable stPV_WriteOnly in contrast, is described by the Modbus TCP Master.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.