EasyManua.ls Logo

LS Industrial Systems GLOFA G7M-DR20U/DC - Page 303

LS Industrial Systems GLOFA G7M-DR20U/DC
367 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 8. Communication Function
8-77
Ex1) CD 01
Function block input
Input value
REQ Enter the input condition to operate
CH 16#0 or 0 Set channel (0, 1)
SLV_ADDR 16#11 or 17 Slave station
FUNC 16#0F or 15 Enter ‘15’ as bits are continually written on the output coils.
ADDR 16#13 or 19
Set the starting address to write on the slave station
- Write on no. 19, starting from Holding Register 00020 in
accordance with the previous no. 8) “Modbus addressing rules.”
The highest data of the data address doesn’t need to be input.,
because it’s automatically processed by the input value in the
input FUNC of the function block.
NUM 16#0A or 10
Set the number of data to write on the slave station..
- Example is to be read from 00020, of which the total data size is
10. Input 16#0A.
z Result
From the 2 bytes (16 bits) sent, only the low 10 bits are valid as set for its size.
Coil
00029
00028
00027
00026
00025
00024
00023 00022 00021
00020
Status 0 1 1 1 0 0 1 1 0 1
z It’s supposed that GM7U main unit is the master and it writes word data continually on the Holding
Registers of the station no. 17, a Modicon product.
z The master writes 000A and 0102 on the Holding Registers 40002 of the slave station no. 17. The data
that is to be written are saved in any array variable WR_DB1 of the 4 sized BYTE type.
Variable Value to save
WR_DB1 [0] 2#00001010 or 16#0A
WR_DB1 [1] 2#00000000 or 16#00
WR_DB1 [2] 2#00000010 or 16#02
WR_DB1 [3] 2#00000001 or 16#01
z The size of BYTE_CNT is the same as when the data to be written are converted by byte. The
above data are 2 words that need 4 bytes. Therefore the size of BYTE_CNT is 4.
z Data is sent starting from the low word by byte unit. An example of sending the above data is as
follows.

Table of Contents

Related product manuals