5 MODULE DEDICATED INSTRUCTION
5.4 Network Dedicated Instruction
105
5
Program example
• The following program stores 10-word data, which are stored in the devices starting from D0, to the devices starting 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
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_RIWT(TRUE, H04, Var_ControlData, D0, Var_Result); (* Performs writing *)
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 write points
Performs writing
Turns execution flag ON
Turns execution flag OFF
Sets station number
Process on error completion
Process on completion of writing
Process on normal completion
(* Process on completion of writing *)
(* 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: ......