42
5 MODULE DEDICATED INSTRUCTION
5.2 Positioning Instruction
[ST]
PLS(SM400, Var_Flag_Inst); (* Absolute position restoration pulse *)
IF((Var_Flag_Inst=TRUE) & (X0=FALSE))THEN
SET(TRUE, Var_Flag_Mem); (* Turns absolute position restoration memory ON *)
MOV(TRUE, 0, Var_ControlData[4]); (* Clears completion status *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
MOV(TRUE, Var_ControlData[3], K1Y50); (* Turns the servo ON with the data to be sent to the servo amplifier *)
ELSE (* Error completion *)
MOV(TRUE, Var_ControlData[4], Var_ErrorCode); (* Sets completion status to error code *)
END_IF;
IF(Var_ControlData[4]=0)THEN
RST(TRUE, Var_Flag_Mem); (* Turns absolute position restoration memory OFF *)
END_IF;
END_IF;
IF(Var_Flag_Mem=TRUE)THEN (* absolute position restoration memory ON *)
(* Sets ABS data *)
BSET(X47, 0, Var_ControlData[2]); (* Sets ABS data in data b0 received from the servo *)
BSET(X48, 1, Var_ControlData[2]); (* Sets ABS data in data b1 received from the servo *)
BSET(X49, 2, Var_ControlData[2]); (* Sets send data ready flag in data b2 received from the servo *)
Z_ABRST1(TRUE, "00", Var_ControlData, Var_Result); (* Restores absolute position *)
END_IF;
Содержание 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: ......