Omron NX701-1 User Manual page 355

Machine automation controller nj/nx-series cpu unit
Hide thumbs Also See for NX701-1:
Table of Contents

Advertisement

ST Programming
// If the input parameters for absolute positioning and starting cam operation are not set, the target values and other
parameters are set.
IF InitFlag=FALSE THEN
// The input parameters for the MC_MoveAbsolute (Absolute Positioning) instruction are set.
Mv_Abs_Pos
Mv_Abs_Vel
Mv_Abs_Acc
Mv_Abs_Dec
// The input parameters for the MC_CamIn (Start Cam Operation) instruction are set.
Camin_EM
Camin_StMode := _eMC_START_MODE#_mcAbsolutePosition;
Camin_StPos
Camin_MStDis
Camin_MSc
Camin_SSc
Camin_MO
Camin_SO
Camin_RT
Camin_Dir
// The cam table is selected.
CamTable0
CamTable1
// The Input Parameter Initialization Completed Flag is changed to TRUE.
InitFlag := TRUE;
END_IF;
// If the Servo Drive is ready when StartPg is TRUE, turn ON the Servo for axis 0.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr_En:=TRUE;
ELSE
Pwr_En:=FALSE;
END_IF;
// If the Servo Drive is ready when StartPg is TRUE, turn ON the Servo for axis 1.
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 0 or axis 1, 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 0 and home is not defined, the MC_Home instruction is executed.
IF (Pwr1_S=TRUE)
AND (MC_Axis000.Details.Homed=FALSE) THEN
Hm1_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 1 and home is not defined, the MC_Home instruction is executed.
IF (Pwr2_S=TRUE)
AND (MC_Axis001.Details.Homed=FALSE) THEN
NJ/NX-series CPU Unit Motion Control User's Manual (W507)
:= LREAL#10000.0;
:= LREAL#2000.0;
:= LREAL#2000.0;
:= LREAL#2000.0;
:= TRUE;
:= LREAL#1.0;
:= LREAL#1.0;
:= LREAL#1.0;
:= LREAL#1.0;
:= LREAL#0.0;
:= LREAL#0.0;
:= _eMC_REFERENCE_TYPE#_mcCommand;
:= _eMC_DIRECTION#_mcNoDirection;
:=BOOL#TRUE;
:=BOOL#FALSE;
10 Sample Programming
10
10-49

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nx102-1Nx102-90Nj501Nj301-1Nx1p2-1Nx1p2-90 ... Show all

Table of Contents