![Omron NJ501-1300 User Manual Download Page 258](http://html1.mh-extra.com/html/omron/nj501-1300/nj501-1300_user-manual_742205258.webp)
10 Sample Programming
10-4
NJ-series CPU Unit Motion Control User’s Manual (W507)
10-2 Basic Programming Samples
This section provides programming samples for the basic functions of the MC Function Module.
Precautions for Correct Use
Precautions for Correct Use
•
When you use these programming samples for reference, be sure to add programming for suit-
able interlocks that suit the operating conditions of the devices.
•
Enter the variables that are used in the programming samples from the Programming Layer in
the Edit Pane of the Sysmac Studio.
In this sample, the MC_Power (Power Servo) instruction is executed to turn ON the Servo for the Servo
Drive when EtherCAT process data communications are established with the Servo Drive.
Samples are provided for both ladder diagram and ST programming.
10-2-1 Monitoring EtherCAT Communications and Turning ON Servos
Main Variables Used in the Programming Samples
Variable name
Data type
Default
Comment
MC_Axis000
_sAXIS_REF
---
This is the Axis Variable for axis 0.
MC_Axis000.MFaultLvl.Active
BOOL
FALSE
TRUE when there is a minor fault level error for
axis 0.
MC_Axis000.Cfg.NodeAddress
UINT
---
This is the node address.
_EC_PDSlavTbl[N]
BOOL
FALSE
TRUE when EtherCAT process data communi-
cations for node address N are in Operational
state.
StartPg
BOOL
FALSE
When
StartPg
is TRUE, the Servo is turned ON
if EtherCAT process data communications are
active and normal.
Summary of Contents for NJ501-1300
Page 12: ...Sections in this Manual 10 NJ series CPU Unit Motion Control User s Manual W507...
Page 18: ...16 NJ series CPU Unit Motion Control User s Manual W507 CONTENTS...
Page 22: ...Read and Understand this Manual 20 NJ series CPU Unit Motion Control User s Manual W507...
Page 34: ...Revision History 32 NJ series CPU Unit Motion Control User s Manual W507...
Page 86: ...3 Configuring Axes and Axes Groups 3 28 NJ series CPU Unit Motion Control User s Manual W507...
Page 122: ...5 Motion Control Parameters 5 24 NJ series CPU Unit Motion Control User s Manual W507...
Page 158: ...6 Motion Control Programming 6 36 NJ series CPU Unit Motion Control User s Manual W507...
Page 166: ...7 Manual Operation 7 8 NJ series CPU Unit Motion Control User s Manual W507...
Page 182: ...8 Homing 8 16 NJ series CPU Unit Motion Control User s Manual W507...
Page 346: ...10 Sample Programming 10 92 NJ series CPU Unit Motion Control User s Manual W507...
Page 422: ...Appendices A 18 NJ series CPU Unit Motion Control User s Manual W507...
Page 423: ...Index 1 NJ series CPU Unit Motion Control User s Manual W507 I Index...
Page 430: ...Index 8 NJ series CPU Unit Motion Control User s Manual W507 Index...