
Chapter 8 Exercising program
8-5
[Figure 8.2] Dedicated master program
Setting values of RD_START variables used in interlock contact point are as follows. Initial value as an auto-
variable is set to ‘1’ to execute GM_RD Function Block in the first scan.
Interlock program:
Connect the contact point adjusting execution
condition of READ/WRITE Function Blocks
to Function Block’s REQ’ input to allow two
Function Blocks executed in order.
z
RD_START: As an auto-variable, exe-
cuted in the first scan by READ Function
Block as initially set to ‘1’.
z
WR_START: Auto-variable, initial value
‘0’
z
OR-connect READ.NDR/READ.ERR to
execute READ F/B first and then WRITE F/B
with WR_START ON.
z
OR-connect WRITE.NDR/WRITE.ERR to
execute WRITE F/B first and then READ F/B
Function Block program for dedicated commu-nication
master:
Specify input variables as below with GM_RD
Function Block for READ and GM_WR
Function Block for WRITE.
z
SLOT_NO : Where the module is mounted
z
CH : Channel setting
z
ST_NO : Slave station No.
z
VAR : Slave memory area
z
DATA_LEN : Data length
z
DATA_RD : RX data saving area
z
DATA_WR : TX data saving area