EasyManua.ls Logo

Omron Sysmac NY-series - Page 373

Omron Sysmac NY-series
744 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Vel_Dir :=_eMC_DIRECTION#_mcPositiveDirection;
// MC_GearInPos parameters
Pos1 := LREAL#300.0;
Pos2 := LREAL#200.0;
Gearinpos_Rn := UINT#1;
Gearinpos_Rd := UINT#2;
Gearinpos_Rt :=_eMC_REFERENCE_TYPE#_mcFeedback;
Gearinpos_Mtpos := Pos1;
Gearinpos_Svpos := Pos2;
Gearinpos_Vel := LREAL#180.0;
Gearinpos_Acc := LREAL#180.0;
Gearinpos_Dec := LREAL#180.0;
// 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;
ELSE
Pwr1_En:=FALSE;
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;
ELSE
Pwr2_En:=FALSE;
END_IF;
// If a minor fault level error occurs for axis 1 or axis 2, the error handler for
the device (FaultHandler) is executed.
// 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 Axis Command Instructions
3-285
NY-series Motion Control Instructions Reference Manual (W561)
MC_GearInPos
3
Sample Programming

Table of Contents

Related product manuals