Omron Sysmac NY-series Instruction & Reference Manual page 704

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

Advertisement

5 Common Command Instructions
ELSE
Pwr1_En:=FALSE;
END_IF;
//If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 2 is turned O
N.
//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 in the MC Common Error Status variable or for
any of the axes, the error handler for the device (FaultHandler) is executed.
//The FaultHandler is programmed according to the device.
IF (MC_Axis000.MFaultLvl.Active=TRUE)
OR (MC_Axis001.MFaultLvl.Active=TRUE)
OR (_MC_COM.MFaultLvl.Active=TRUE) THEN
FaultHandler();
END_IF;
//If the Servo is ON for axis 1 and home is not defined, the Home instruction is ex
ecuted.
IF (Pwr1_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm1_Ex:=TRUE;
END_IF;
//If the Servo is ON for axis 2 and home is not defined, the Home instruction is ex
ecuted.
IF (Pwr2_Status=TRUE) AND (MC_Axis001.Details.Homed=FALSE) THEN
Hm2_Ex:=TRUE;
END_IF;
//After homing is completed for axis 1, the MC_MoveVelocity instruction is executed
.
IF Hm1_D=TRUE THEN
Vel_Ex := TRUE;
END_IF;
//If WriteCamDefinition is TRUE and the MC_GenerateCamTable (Generate Cam Table) in
struction is not yet executed, the cam properties and cam nodes are written.
//After the data is written, WriteCamDefinitionDone is changed to TRUE.
IF(WriteCamDefinition = TRUE) THEN
//The cam properties are written.
CamProperty0.CycleTime := REAL#0.800;
5-42
NY-series Motion Control Instructions Reference Manual (W561)

Advertisement

Table of Contents
loading

Table of Contents