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 #318 background imageLoading...
Page #318 background image
10 Sample Programming
10-12
NJ/NX-series CPU Unit Motion Control User’s Manual (W507)
// Check that the Servo Drive is ready when StartPg is TRUE and turn ON the Servo for axis 0.
// If the Servo Drive is not ready, turn OFF the Servo for axis 0.
IF (StartPg =TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr1_En:=TRUE; // Turn ON the Servo for axis 0.
ELSE
Pwr1_En:=FALSE; // Turn OFF the Servo for axis 0.
END_IF;
// Check that the Servo Drive is ready when StartPg is TRUE and turn ON the Servo for axis 1.
// If the Servo Drive is not ready, turn OFF the Servo for axis 1.
IF (StartPg =TRUE)
AND (MC_Axis001.DrvStatus.Ready=TRUE) THEN
Pwr2_En:=TRUE; // Turn ON the Servo for axis 1.
ELSE
Pwr2_En:=FALSE; // Turn OFF the Servo for axis 1.
END_IF;
// If there is a minor fault level error for a composition axis in the axes group.
// execute the error handler (FaultHandler).
IF (MC_Axis000.MFaultLvl.Active=TRUE)
OR (MC_Axis001.MFaultLvl.Active=TRUE)
OR (MC_Group000.MFaultLvl.Active=TRUE) THEN
FaultHandler(); // Program the FaultHandler according to the device.
END_IF;
// If the Servo is ON for axis 0 and home is not defined, the MC_Home instruction is executed.
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.
IF (Pwr2_Status=TRUE)
AND (MC_Axis001.Details.Homed=FALSE) THEN
Hm2_Ex:= TRUE;
END_IF;
// If the axes group is disabled and home is defined for axis 0 and axis 1, the axes group is enabled.
IF (MC_Group000.Status.Disabled=TRUE)
AND (Hm1_D=TRUE) AND (Hm2_D=TRUE) THEN
Grp_En_Ex:= TRUE;
END_IF;
// If there is a minor fault level error for the axes group, the axes group is disabled.
IF MC_Group000.MFaultLvl.Active=TRUE THEN
Grp_Dis_Ex:=TRUE;
END_IF;
// If ResetON is TRUE (i.e., if the external button is ON) and the axes group is stopped, the error is reset.
IF (ResetON=TRUE)
AND (MC_Group000.Status.ErrorStop=TRUE)
AND (MC_Group000.Details.Idle=TRUE) THEN
Grp_Reset_Ex := TRUE;
END_IF;
//MC_Power1
PWR1(
Axis := MC_Axis000,
Enable := Pwr1_En,
Status => Pwr1_Status,
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