IF (StartPg=TRUE)
AND (MC_Axis001.DrvStatus.Ready=TRUE) THEN
Pwr2_En:=TRUE; // Turn ON the Servo for axis 2.
ELSE
Pwr2_En:=FALSE; // Turn OFF the Servo for axis 2.
END_IF;
// Processing for a minor fault level error
// Program the FaultHandler according to the device.
IF (MC_Axis000.MFaultLvl.Active=TRUE) OR (MC_Axis001.MFaultLvl.Active=TRUE)
OR (MC_Group000.MFaultLvl.Active=TRUE) THEN
FaultHandler();
END_IF;
// If the Servo is ON for axis 1 and home is not defined, the Home instruction is e
xecuted.
IF (Pwr1_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm1_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 2 and home is not defined, the Home instruction is e
xecuted.
IF (Pwr2_Status=TRUE) AND (MC_Axis001.Details.Homed=FALSE) THEN
Hm2_Ex:=TRUE;
END_IF;
// If axes group 0 is disabled after homing is completed for axis 1 and axis 2, it
is enabled.
IF (Hm1_D=TRUE) AND (Hm2_D=TRUE) AND (MC_Group000.Status.Disabled=TRUE)THEN
Grp_En_Ex:= TRUE;
END_IF;
// If axes group 0 is enabled, linear interpolation (1) is executed.
IF Grp_En_D=TRUE THEN
Mv_Lin1_Ex:=TRUE;
END_IF;
// The rest of the instructions are executed with multi-execution of instructions w
hen the Active output variable for linear interpolation (1) changes to TRUE.
IF Mv_Lin1_Act=TRUE THEN
Mv_Circ1_Ex:=TRUE;
Mv_Lin2_Ex:=TRUE;
Mv_Circ2_Ex:=TRUE;
END_IF;
// MC_Power for axis 1
PWR1(
4 Axes Group Instructions
4-70
NY-series Motion Control Instructions Reference Manual (W561)