Omron Sysmac NY-series Instruction & Reference Manual page 224

Industrial pc platform, motion control
Hide thumbs Also See for Sysmac NY-series:
Table of Contents

Advertisement

3 Axis Command Instructions
// MV_ABS parameters
Mv_Abs_Pos := LREAL#1000.0;
Mv_Abs_Vel := LREAL#500.0;
Mv_Abs_Acc := LREAL#10000.0;
Mv_Abs_Dec := LREAL#10000.0;
Mv_Abs_Jrk := LREAL#10000.0;
// MV_ZERO parameters
Mv_Zero_Vel := LREAL#500.0;
Mv_Zero_Acc := LREAL#10000.0;
Mv_Zero_Dec := LREAL#10000.0;
Mv_Zero_Jrk := LREAL#10000.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 for axis 1 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
Pwr1_En:=TRUE; // Turn ON the Servo.
ELSE
Pwr1_En:=FALSE; // Turn OFF the Servo.
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 2 is turned
ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
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)THEN
FaultHandler();
END_IF;
// If the Servo is ON for axis 1 and home is not defined, the Home instruction is e
3-136
NY-series Motion Control Instructions Reference Manual (W561)

Advertisement

Table of Contents
loading

Table of Contents