Module object for Modbus TCP I/O.
Defines the type of Modbus action that is to be performed and at which address on the slave.
The action is defined by a function code which means either reading or writing data to
the Modbus slave.
The supported function codes are:
ReadCoils (FC 1)
This function code is used to read from 1 to 2000 contiguous status of coils in a remote device.
Typically the input data area is defined by a number of ChanDi's which represent
the number of coils you want to read. The represenation on the ChanDi should be set to Bit8.
ReadDiscreteInputs (FC 2)
This function code is used to read from 1 to 2000 contiguous status of discrete inputs
in a remote device. Typically the input data area is defined by a number of ChanDi's
which represent the number of coils you want to read.
The represenation on the ChanDi should be set to Bit8.
ReadHoldingRegisters (FC 3)
This function code is used to read the contents of a contiguous block of holding registers
in a remote device.
Typically the input data area is defined by a number of ChanIi's which represent
the number of registers you want to read. The represenation on the ChanIi should
be set to UInt16 or Int16. ChanAi and ChanDi is also applicable. In case of ChanDi the
representation should be set to Bit16.
ReadInputRegisters (FC 4)
This function code is used to read from 1 to 125 contiguous input registers
in a remote device.
Typically the input data area is defined by a number of ChanIi's which represent
the number of registers you want to read. The represenation on the ChanIi should
be set to UInt16 or Int16. ChanAi and ChanDi is also applicable. In case of ChanDi the
representation should be set to Bit16.
WriteSingleCoil (FC 5)
This function code is used to write to one single coil.
Typically the output data area is defined by one ChanDo's which represent
the state of the coil to write to.
WriteMultipleCoils (FC 15)
This function code is used to force each coil in a sequence of coils to either ON or OFF
in a remote Device.
Typically the output data area is defined by a number of ChanDo's which represent
the number of coils you want to write. The represenation on the ChanDo should
be set to Bit8.
WriteMultipleRegisters (FC 16)
This function code is used to write a block of contiguous registers (1 to 123 registers)
in a remote device.
Typically the output data area is defined by a number of ChanIo's which represent
the number of registers you want to write. The represenation on the ChanIo should
be set to UInt16 or Int16. ChanAo and ChanDo is also applicable. In case of ChanDo the
representation should be set to Bit16.
See also
The function code defines the action that is to be perfomed with the Modbus slave.
The module is handled with the scantime of the thread.
The supported function codes are:
(FC 1) ReadCoils
(FC 2) ReadDiscreteInputs
(FC 3) ReadHoldingRegisters
(FC 4) ReadInputRegisters
(FC 5) WriteSingleCoil
(FC 15) WriteMultipleCoils
(FC 16) WriteMultipleRegisters
Specifies, in relation to the scantime of the thread, how
often the module is handled. If ScanInterval i 1, the module
is handled every scan. If ScanInterval is for example 10, it
is handled every 10'th scan, i.e. the scantime for the module
will be ScanInterval times the scantime of the thread.
Process that handles the card.
1: The card is read by the plc process, and is handled by a specific
thread in the plc, which is specified in the ThreadObject attribute.
2: The card is read by the rt_io_comm process.
4: The card is handled by an application program.