Omron Sysmac NY-series Instruction & Reference Manual page 521

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

Advertisement

Switches[1].CamSwitchMode :=_eMC_SWITCH_MODE#_mcPositionBased;
Switches[2].TrackNumber := UINT#0;
Switches[2].FirstOnPosition := LREAL#4000.0;
Switches[2].LastOnPosition := LREAL#1000.0;
Switches[2].AxisDirection :=_eMC_DIRECTION#_mcNoDirection;
Switches[2].CamSwitchMode :=_eMC_SWITCH_MODE#_mcPositionBased;
Switches[3].TrackNumber := UINT#1;
Switches[3].FirstOnPosition := LREAL#3000.0;
Switches[3].Duration := T#1350ms;
Switches[3].AxisDirection :=_eMC_DIRECTION#_mcNoDirection;
Switches[3].CamSwitchMode :=_eMC_SWITCH_MODE#_mcTimeBased;
//InitFlag is changed to TRUE after input parameters are set.
InitFlag:=TRUE;
END_IF;
//If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned O
N.
//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;
//If a minor fault level error occurs for axis 1, the error handler for the device
(FaultHandler) is executed.
//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) THEN
Hm_Ex:=TRUE;
END_IF;
//After home is defined, MC_MoveVelocity is executed.
IF MC_Axis000.Details.Homed=TRUE AND Hm_D=TRUE THEN
Vel_Ex:=TRUE;
END_IF;
//MC_Power
PWR(
Axis := MC_Axis000,
NY-series Motion Control Instructions Reference Manual (W561)
3 Axis Command Instructions
3
3-433

Advertisement

Table of Contents
loading

Table of Contents