Omron Sysmac NY-series Instruction & Reference Manual page 533

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

Advertisement

//MC_MoveVelocity parameters
Vel_Vel := LREAL#1000.0;
Vel_Acc := LREAL#0.0;
Vel_Dec := LREAL#0.0;
Vel_Jrk := LREAL#1000.0;
//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;
//The number of rotations of the encoder axis is counted.
//(If the current value is less than the previous value, it is assumed that the mod
ulo maximum position has been exceeded.)
IF MC_Axis001.Act.Pos<PreAxis001ActPos THEN
Inc(RotaryCount);
END_IF;
PreAxis001ActPos := MC_Axis001.Act.Pos;
//MC_TimeStampToPos
NY-series Motion Control Instructions Reference Manual (W561)
3 Axis Command Instructions
3
3-445

Advertisement

Table of Contents
loading

Table of Contents