Data transfer via communication ports
775
Part III FP Instructions
F146_READ_DATA_
TYPE_OFFS
Read Data from Slave with Type and Offset
The data is read from the memory area of the slave specified by SlaveAddressType and
SlaveAddressOffs. It is stored in the area of the master specified by MasterWordAddress.
General programming information for F145 and F146 (see page 766)
PLC types
Availability of F146_READ_DATA_TYPE_OFFS (see page 1321)
Variable Data type Function
Port Specifies the slave's COM port (1 or 2) via system variable:
SYS_COM1_PORT
SYS_COM2_PORT
SlaveAddress Address of the remote station (1-99).
SlaveWordAddressType Address type in the slave from which data is read.
SlaveWordAddressOffs The offset for the starting slave address whose type is
defined by SlaveWordAddressType and to which the data
is written.
NumberOfWords_
BitsInWords
ANY16
Number of word units to be read by the master (if the
highest bit is not set) or bits in word (if the highest bit is set).
Is identical to the lower word of s1_ControlData.
MasterWordData ANY The master data which is written to the slave.
Description
Use this instruction to request data from a slave via the serial port (COM1 or COM2) using
MEWTOCOL or Modbus RTU protocol (see communication mode (see page 712)), as defined in
the system register setting
s (see page 1273) of port used. Master and slave must both use the
same protoc
ol. The master must be configured in Master/Slave mode. The slave can be configured
either in Master/Slave mode or in Slave mode only.
Data types