Omron NY532-1500 Reference Manual page 284

Ny-series industrial pc platform
Hide thumbs Also See for NY532-1500:
Table of Contents

Advertisement

3 Axis Command Instructions
// MC_CamOut parameters
Camout_Dec := DecRate2;
// Change InitFlag to TRUE after setting the input parameters.
InitFlag := TRUE;
END_IF;
// If StartPg is TRUE and EtherCAT communications are normal, the Servo for axis 1 is turned ON.
// If EtherCAT communications are not normal, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (_EC_PDSlavTbl[MC_Axis000.Cfg.NodeAddress]=TRUE)
AND (_EC_CommErrTbl[MC_Axis000.Cfg.NodeAddress]=FALSE) THEN
Pwr1_En:=TRUE;
ELSE
Pwr1_En:=FALSE;
END_IF;
// If StartPg is TRUE and EtherCAT communications are normal, the Servo for axis 2 is turned ON.
// If EtherCAT communications are not normal, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (_EC_PDSlavTbl[MC_Axis001.Cfg.NodeAddress]=TRUE)
AND (_EC_CommErrTbl[MC_Axis001.Cfg.NodeAddress]=FALSE) 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 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 executed for axis 1.
IF (Pwr1_S=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 executed for axis 2.
IF (Pwr2_S=TRUE) AND (MC_Axis001.Details.Homed=FALSE) THEN
Hm2_Ex:=TRUE;
END_IF;
// After homing is completed for axis 1, MC_MoveVelocity is executed.
IF Hm1_D=TRUE THEN
Vel_Ex := TRUE;
END_IF;
// CamIn is executed when InVel of MC_MoveVelocity is TRUE.
IF Vel_InVel=TRUE THEN
Camin_Ex := TRUE;
END_IF;
// CamOut is executed when Camin_InCam0 is TRUE and MC_Axis001.Act.Pos is greater than 1000.
IF (Camin_InCam0=TRUE) AND (MC_Axis001.Act.Pos>LREAL#1000.0) THEN
Camout_Ex := TRUE;
END_IF;
// MC_Power for axis 1
PWR1(
Axis
Enable
3-200
:= MC_Axis000,
:= Pwr1_En,
NY-series Motion Control Instructions Reference Manual (W561)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ny512-1500Ny532-1400Ny512-1400Ny512-1300Ny532-1300

Table of Contents