Mv_Abs2_Acc := LREAL#1000.0;
Mv_Abs2_Dec := LREAL#1000.0;
Mv_Abs2_Dir :=_eMC_DIRECTION#_mcNoDirection;
Mv_Abs2_Bm :=_eMC_BUFFER_MODE#_mcBuffered;
// MV_ABS3 parameters
Mv_Abs3_Pos := LREAL#200.0;
Mv_Abs3_Vel := LREAL#30.0;
Mv_Abs3_Acc := LREAL#1000.0;
Mv_Abs3_Dec := LREAL#1000.0;
Mv_Abs3_Dir :=_eMC_DIRECTION#_mcNoDirection;
Mv_Abs3_Bm :=_eMC_BUFFER_MODE#_mcBuffered;
// MV_ZERO parameters
Mv_Zero_Vel := LREAL#250;
Mv_Zero_Acc := LREAL#1000.0;
Mv_Zero_Dec := LREAL#1000.0;
Mv_Zero_Bm :=_eMC_BUFFER_MODE#_mcBuffered;
// Change InitFlag to TRUE after setting the input parameters.
InitFlag:=TRUE;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo is turned ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr_En:=TRUE;
ELSE
Pwr_En:=FALSE;
END_IF;
// Processing for a minor fault level error
// Program the FaultHandler according to the device.
IF MC_Axis000.MFaultLvl.Active=TRUE THEN
FaultHandler();
END_IF;
// If the Servo is ON and home is not defined, the Home instruction is executed.
IF (Pwr_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm_Ex:=TRUE;
END_IF;
// After home is defined, MV_ABS1 is executed.
IF Hm_D=TRUE THEN
Mv_Abs1_Ex:=TRUE;
3 Axis Command Instructions
3-67
NY-series Motion Control Instructions Reference Manual (W561)
MC_MoveAbsolute
3
Sample Programming 1