Chapter 8. Communication Function
8-72
z Data is sent starting from the high byte by byte unit. An example of sending the above data is as follows.
Ex1) 02 2B 00 00 00 64
Function block input Input value
REQ Enter the input condition to operate
CH 16#0 or 0 Set channel (0, 1)
SLV_STNO 16#11 or 17 Slave station
FUNC 16#03 or 3 Enter ‘3’ when the output register is being read
SLV_ADDR 16#6B or 107
The start address to read from slave station
- Read the no. 107 to read starting from the output register 40108 in
accordance with the previous no. 8) “Modbus addressing rules.” And
the highest data of the data address doesn’t need to be input.
Because it’s automatically processed by the input value of the input
FUNC of the function block.
NUM 16#03 or 3
The total data size to read
- Example is to be read 40108 ~ 40110, of which the total data size is 3.
Input 16#03 or 3.
z Result
Variable Value to save
RD_DW0 [0] 16#002B or 555
RD_DW0 [1] 16#0000 or 0
RD_DW0 [2] 16#0064 or 100
RD_DW0 [3] X
z The variable to which saves the previously read data must be array type. The size of array type must be the
same or bigger than the size of the data of read. If it’s smaller, the error code is marked in STATUS.
z The previously read data is saved from the array variable, RD_DW0 [0].
z The remnant part of an array variable is redundancy, after the variable is filled with the previously read data.