Datasheet
This function code is used to read the contents of a contiguous block of holding registers in a
remote device. A register is 2 bytes long. Typically the input data area is defined by a number of
ChanIi's which represent the number of registers you want to read. The representation 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 representation 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.
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 representation 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 representation 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.
Specify the data area
To specify the data area a number of channel objects are placed as children to the module object. In
the channel object you should set Representation, that specifies the format of a parameter, and in
some cases also Number (for Bit representation). The data area is configured in much the same way
as the Profibus I/O except for that you never have to think about the byte ordering which is
specified by the MODBUS standard to be Big Endian.
To clarify how the data area is specified an example is given below.
Example
In this example we have a device which is a modular station of type Schneider. That means a station
to which a number of different I/O-modules could be connected. We will use the function codes for
reading and writing holding registers (FC3 and FC16). Our station consist of
1 Di 6 module
1 Do 6 module
1 Ai 2 module
1 Ao 2 module
According to the specification of this modular station the digital input module uses 2 registers, one
to report data and one to report status. The digital output module uses one register to echo output
data and reports one register as status. The analog input module uses 2 registers, one for each
channel. The analog output module uses two registers for output data and reports 2 registers as
status for each channel. Thus the data area looks like:
Input area










