5 MODULE DEDICATED INSTRUCTION
5.4 Network Dedicated Instruction
101
5
Program example
• The following program reads out 10-word data, which start from D1000 of the number 1 local station connected to the
master module mounted on the I/O numbers from X/Y40 to X/Y5F, and stores the data in the devices starting from D0 when
X0 turns ON.
(When the refresh device of the link special register (SW) is set to SW0.)
[Structured ladder/FBD]
[ST]
IF((X0=TRUE)
&(Var_Flag_Exe=FALSE) (* Execution flag *)
&(SW80.0=FALSE))THEN (* Data link status of station number 1 *)
MOV(TRUE,1, Var_ControlData[1]); (* Sets station number *)
MOV(TRUE,H0405, Var_ControlData[2]); (* Sets access code and attribute code *)
MOV(TRUE, 1000, Var_ControlData[3]); (* Sets device number *)
MOV(TRUE, 10, Var_ControlData[4]); (* Sets number of read points *)
G_RIRD(TRUE, H04, Var_ControlData, D0, Var_Result); (* Performs readout *)
SET(TRUE, Var_Flag_Exe); (* Turns execution flag ON *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
ELSE (* Error completion *)
END_IF;
RST(TRUE, Var_Flag_Exe); (* Turns execution flag OFF *)
END_IF;
Sets access code and attribute code
Sets device number
Sets number of read points
Performs readout
Turns execution flag ON
Turns execution flag OFF
Sets station number
Process on normal completion
Process on error completion
Process on completion of readout
(* Process on completion of readout *)
(* Process on normal completion *)
(* Process on error completion *)
Содержание MELSEC System Q
Страница 1: ...MELSEC Q L Structured Programming Manual Special Instructions ...
Страница 2: ......
Страница 307: ...10 SFC CONTROL INSTRUCTION 10 2 SFC Transition Condition Comment Read 305 10 MEMO ...
Страница 309: ...I 307 MEMO ...
Страница 315: ......