EasyManuals Logo

Omron NX701-1 User Manual

Omron NX701-1
448 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #388 background imageLoading...
Page #388 background image
10 Sample Programming
10-82
NJ/NX-series CPU Unit Motion Control User’s Manual (W507)
// If the input parameters for the instructions are not set, the target values and other parameters are set.
IF InitFlag=FALSE THEN
// The input parameters for the MC_MoveVelocity (Velocity Control) instruction are set.
Vel_Vel := LREAL#1000.0;
Vel_Acc := LREAL#0.0;
Vel_Dec := LREAL#0.0;
Vel_Dir := _eMC_DIRECTION#_mcPositiveDirection;
// The input parameters for the MC_CamIn (Start Cam Operation) instruction are set.
Camin_Em := TRUE;
Camin_Sm := _eMC_START_MODE#_mcRelativePosition;
Camin_Sp := LREAL#0.0;
Camin_Msd := LREAL#0.0;
Camin_Ms := LREAL#1.0;
Camin_Ss := LREAL#1.0;
Camin_Mo := LREAL#0.0;
Camin_So := LREAL#0.0;
Camin_Rt := _eMC_REFERENCE_TYPE#_mcCommand;
Camin_Dir := _eMC_DIRECTION#_mcNoDirection;
// 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 the Servo Drive is not ready, turn OFF the Servo.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr1_En:=TRUE;
ELSE
Pwr1_En:=FALSE;
END_IF;
// If the Servo Drive is ready when StartPg is TRUE, turn ON the Servo for axis 1.
// If the Servo Drive is not ready, turn OFF the Servo.
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.
// Program the FaultHandler 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 0 and home is not defined, the MC_Home instruction is executed for axis 0.
IF (Pwr1_Status=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 for axis 1.
ST Programming

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NX701-1 and is the answer not in the manual?

Omron NX701-1 Specifications

General IconGeneral
BrandOmron
ModelNX701-1
CategoryController
LanguageEnglish

Related product manuals