10 Sample Programming
10-16
NJ-series CPU Unit Motion Control User’s Manual (W507)
In this sample, further processing is not performed if there is an error when the MC_Power (Power
Servo) instruction is executed. Whether further processing is possible is indicated by the
UpgOn
vari-
able.
Samples are provided for both ladder diagram and ST programming.
10-2-5 Monitoring for Instruction Errors
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.
Pwr_Status
BOOL
FALSE
This variable is assigned to the
Status
output
variable from the PWR instance of the
MC_Power instruction. It is TRUE when the
Servo is ON.
Pwr_Bsy
BOOL
FALSE
This variable is assigned to the
Busy
output
variable from the PWR instance of the
MC_Power instruction. It is TRUE when the
Servo is ON.
StartPg
BOOL
FALSE
When
StartPg
is TRUE, the Servo is turned ON
if EtherCAT process data communications are
active and normal.
UpgOn
BOOL
FALSE
TRUE if further program execution is performed.
Ladder Diagram
StartPg
Lock
_EC_PDSlavTbl[MC_Axis000.Cfg.NodeAddress] _EC_CommErrTbl[MC_Axis000.Cfg.NodeAddress
PWR
Error
Axis
Axis
Enable
Status
Busy
MC_Power
ErrorID
Lock
MC_Axis000
Pwr_Status
Pwr_Bsy
Pwr_Err
Pwr_ErrID
Pwr_Status
UpgOn
Pwr_Bsy
The Servo for axis 0 is turned ON if process data communications are active and normal.
When
StartPg
is TRUE, the status of process data communications is checked to see if communications
are active and normal.
A check is made to see if any errors occurred when MC_Power was executed before execution of further processing.
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...