![background image](http://html1.mh-extra.com/html/omron/nj501-1300/nj501-1300_user-manual_742205278.webp)
10 Sample Programming
10-24
NJ-series CPU Unit Motion Control User’s Manual (W507)
In this sample, the MC_GroupStop instruction is executed to decelerate to a stop if an external button
turns ON during execution of the MC_MoveLinearAbsolute (Absolute Linear Interpolation) instruction. If
there is a minor fault level error, the
CommandAborted
output variable from the MC_GroupStop instruc-
tion changes to TRUE. In that case, the MC_GroupImmediateStop instruction is executed to stop imme-
diately. If for any reason the
Error
output variable from the MC_GroupStop instruction changes to
TRUE, the MC_GroupImmediateStop instruction is executed to stop immediately. If the
MC_GroupImmediateStop instruction is executed, the axes group status is Error Deceleration Stop-
ping.
10-2-8 Stopping an Axes Group in Coordinated Motion
Main Variables Used in the Programming Samples
Variable name
Data type
Default
Comment
MC_Group000
_sGROUP_REF
---
This is the Axes Group Variable for axes group 0.
MC_Group000.Status.Disabled
BOOL
FALSE
TRUE when axes group 0 is disabled.
MC_Group000.MFaultLvl.Active
BOOL
FALSE
TRUE when there is a minor fault level error for axes
group 0.
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.Details.Homed
BOOL
FALSE
TRUE when home is defined for axis 0.
MC_Axis001
_sAXIS_REF
---
This is the Axis Variable for axis 1.
MC_Axis001.MFaultLvl.Active
BOOL
FALSE
TRUE when there is a minor fault level error for axis 1.
MC_Axis001.Details.Homed
BOOL
FALSE
TRUE when home is defined for axis 1.
Pwr1_Status
BOOL
FALSE
This variable is assigned to the
Status
output variable
from the PWR1 instance of the MC_Power instruction.
It is TRUE when the Servo is ON.
Pwr2_Status
BOOL
FALSE
This variable is assigned to the
Status
output variable
from the PWR2 instance of the MC_Power instruction.
It is TRUE when the Servo is ON.
Grp_Stp_Ca
BOOL
FALSE
This variable is assigned to the
CommandAborted
output variable from the GRP_EN instance of the
MC_GroupStop instruction.
Grp_Stp_Err
BOOL
FALSE
This variable is assigned to the
Error
output variable
from the GRP_EN instance of the MC_GroupStop
instruction.
StartPg
BOOL
FALSE
When
StartPg
is TRUE, the Servo is turned ON if
EtherCAT process data communications are active
and normal.
StopOn
BOOL
FALSE
This variable gives the status of the external button
that is used to stop. The MC_GroupStop instruction is
executed to stop the axes group if this variable is
TRUE.
InitFlag
BOOL
FALSE
TRUE if the input parameters are set for the
MC_MoveLinearAbsolute and MC_GroupStop
instructions.
Grp_En_Ex
BOOL
FALSE
This variable is used to execute the GRP_EN instance
of the MC_GroupEnable instruction. It is used in ST
programming.
Mv_Lin_Abs_Ex
BOOL
FALSE
This variable is used to execute the MV_LIN_ABS
instance of the MC_MoveLinear instruction. It is used
in ST programming.
Grp_Stp_Ex
BOOL
FALSE
This variable is used to execute the GRP_STP
instance of the MC_GroupStop instruction. It is used
in ST programming.
Grp_Imd_Stp_Ex
BOOL
FALSE
This variable is used to execute the GRP_IMD_STP
instance of the MC_GroupImmediateStop instruction.
It is used in ST programming.
Содержание NJ501-1300
Страница 12: ...Sections in this Manual 10 NJ series CPU Unit Motion Control User s Manual W507...
Страница 18: ...16 NJ series CPU Unit Motion Control User s Manual W507 CONTENTS...
Страница 22: ...Read and Understand this Manual 20 NJ series CPU Unit Motion Control User s Manual W507...
Страница 34: ...Revision History 32 NJ series CPU Unit Motion Control User s Manual W507...
Страница 44: ...1 Introduction to the Motion Control Function Module 1 10 NJ series CPU Unit Motion Control User s Manual W507...
Страница 58: ...2 Motion Control Configuration and Principles 2 14 NJ series CPU Unit Motion Control User s Manual W507...
Страница 86: ...3 Configuring Axes and Axes Groups 3 28 NJ series CPU Unit Motion Control User s Manual W507...
Страница 98: ...4 Checking Wiring from the Sysmac Studio 4 12 NJ series CPU Unit Motion Control User s Manual W507...
Страница 122: ...5 Motion Control Parameters 5 24 NJ series CPU Unit Motion Control User s Manual W507...
Страница 158: ...6 Motion Control Programming 6 36 NJ series CPU Unit Motion Control User s Manual W507...
Страница 166: ...7 Manual Operation 7 8 NJ series CPU Unit Motion Control User s Manual W507...
Страница 182: ...8 Homing 8 16 NJ series CPU Unit Motion Control User s Manual W507...
Страница 346: ...10 Sample Programming 10 92 NJ series CPU Unit Motion Control User s Manual W507...
Страница 422: ...Appendices A 18 NJ series CPU Unit Motion Control User s Manual W507...
Страница 423: ...Index 1 NJ series CPU Unit Motion Control User s Manual W507 I Index...
Страница 430: ...Index 8 NJ series CPU Unit Motion Control User s Manual W507 Index...