Tab 'Modbus Slave Channel'

Object: Modbus Slave Serial, Modbus Slave TCP

You use this tab to define slave channels.

Each channel represents a single Modbus request.

Add Channel

Opens the dialog Modbus Channel. Here you can create new channels for this Modbus slave. In the device description file of the Modbus slave, you can predefine descriptions for individual Modbus registers or entire channels.

Dialog 'ModbusChannel'

Channel

Name

A string that contains the name of the channel

Access type

  • Read coils (function code 1)

  • Read discrete inputs (function code 2)

  • Read holding registers (function code 3)

  • Read input registers (function code 4)

  • Read single coil (function code 5)

  • Write single register (function code 6)

  • Write multiple coils (function code 15)

  • Write multiple registers (function code 16)

  • Read/Write multiple registers (function Ccde 23)

Trigger

  • CYCLIC: The request occurs periodically.

  • Rising edge: The request occurs as a reaction to a rising edge of the Boolean trigger variables. The trigger variable is defined in the tab I/O Mapping.

  • Application: The Modbus request is triggered by the PLC application. This happens by means of the ModbusChannel function block, which is included in the respective I/O driver library. This function block provides complete control of and information about the execution of this command, for example the start time, the processing time, and the result.

Cycle time (ms)

For Trigger = CYCLIC: Request interval

Note: The request interval should be the same as or a multiple of the cycle time of the application.

Comment

Description of the channel

READ Register

Offset

Start address where reading should start (value range 0-65535)

Length

Number of registers to be read (for word access) or number of discrete inputs to be read (for bit access)

Error handling

Defines what should happen to the data in case of a communication error

  • Set to ZERO

  • Keep last value

WRITE Register

Offset

Number of the register to be written to (value range 0-65535)

Length

Number of registers to be written to (= Words)

The value range of the parameter depends on function code.

Example

In the following example, the first line defines a combined read/write operation (function code 23). It reads a word from the holding register with offset 16#0001 and writes two words to the register with offset 16#0003. The operation is performed as soon as the trigger variable defined in the tab I/O Mapping shows a rising edge.

See also