46
5 MODULE DEDICATED INSTRUCTION
5.2 Positioning Instruction
Program example
• The following program performs teaching for the positioning data number 3 of the axis 1 when X39 turns ON.
[Structured ladder/FBD]
[ST]
PLS(X39, Var_Flag_Inst); (* Teaching instruction pulse *)
IF((Var_Flag_Inst=TRUE)&(X0C=FALSE))THEN
SET(TRUE, Var_Flag_Mem); (* Turns teaching instruction memory ON *)
END_IF;
IF(Var_Flag_Mem=TRUE)THEN (* Teaching instruction memory ON *)
MOVP(TRUE, H0, Var_ControlData[2]); (* Sets teaching data *)
MOVP(TRUE, K3, Var_ControlData[3]); (* Sets positioning data number *)
ZP_TEACH1(TRUE, "00", Var_ControlData, Var_Result); (* Performs teaching *)
IF((Var_Result[0]=TRUE)&(Var_Result[1]=FALSE))THEN
RST(TRUE, Var_Flag_Mem); (* Turns teaching instruction memory OFF *)
END_IF;
END_IF;
Teaching instruction
pulse
Turns teaching
instruction memory
ON
Sets teaching data
Sets positioning
data number
Performs teaching
Turns teaching
instruction memory
OFF
Summary of Contents for MELSEC System Q
Page 1: ...MELSEC Q L Structured Programming Manual Special Instructions ...
Page 2: ......
Page 307: ...10 SFC CONTROL INSTRUCTION 10 2 SFC Transition Condition Comment Read 305 10 MEMO ...
Page 309: ...I 307 MEMO ...
Page 315: ......