6-9
6 Motion Control Programming
NJ-series CPU Unit Motion Control User’s Manual (W507)
6-4 Ex
ecution a
nd Statu
s of
Motio
n
C
ont
ro
l
Instru
ctio
ns
6
6-4-1 Basic Rules f
o
r Ex
ecution of Instr
u
ctions
*1
Under the PLCopen specifications,
Error
changes to FALSE and
ErrorID
changes to 0 when
Execute
changes
to FALSE. When
Error
is TRUE, the motion control instruction is not executed. Instructions are not executed
after an error is cleared even if
Execute
is TRUE.
Execute
must change from FALSE to TRUE to execute the
instruction. Enable-type motion control instructions are executed if their
Enable
variable is TRUE when an error
is reset.
*2
When you program the instruction in a ladder diagram, insert an input between the input variable
Execute
or
Enable
and the left bus bar. If the instruction is connected directly to the left bus bar without an input, an error
occurs when the program is built. Set the initial value for or omit any input variable that is reserved.
*3
If the condition expressions or set values for ST Structure instructions do not match, the instructions in that
statement are not executed. For details, refer to the
NJ-series Motion Control Instructions Reference Manual
(Cat. No. W508).
*4
Refer to the
NJ-series Motion Control Instructions Reference Manual
(Cat. No. W508) for an output variable
timing chart.
Error processing
There are two output variables that represent an error when a problem occurs during the
execution of an instruction instance. These outputs are defined as follows:
•
Error
: The output variable
Error
changes to TRUE to indicate that an error occurred
during the execution of the instruction instance.
•
ErrorID
(Error Code): This is an error code that represents the cause of the error.
The output variables
Done
,
InVelocity
(Target Velocity Reached),
InGear
(Gear Ratio
Achieved), and
InSync
all represent normal completion or normal operation and therefore
will never be TRUE when the output variable
Error
is TRUE.
Types of errors:
•
Instruction instance errors (e.g., parameter out of range and illegal condition for state
transition)
•
Axis errors (e.g., Following Error Over Limit and Servo Drive errors)
Some instruction instance errors may not cause an axis error but will cause the axis to
stop.
Operation of output
variable
Done
The output variable
Done
,
InGear
(Gear Ratio Achieved), or
InSync
will change to TRUE
when the instruction ends operation normally or when the commanded condition is
reached. When working with multiple instructions that operate on the same axis, the out-
put variable
Done
from the first instruction will not change to TRUE if another operation
instruction takes over before the axis operation for the first instruction reaches the target
position.
Operation of output
variable
Command-
Aborted
The output variable
CommandAborted
will change to TRUE when another operation
instruction interrupts the commanded operation. For the MC Function Module, this vari-
able will change to TRUE when a motion control instruction is executed and the target
axis or axes group causes an error or is decelerating to a stop. All other output variables
change to FALSE when
CommandAborted
changes to TRUE.
Input variables out-
side of valid range
The instruction instance will output an error when it is executed with an input variable that
is outside of the valid range.
Operation of output
variable
Busy
The output variable
Busy
is TRUE when the instruction instance is executing.
Busy
will
change to TRUE when the input variable
Execute
changes to TRUE.
Busy
will change to
FALSE when the output variable
Done
,
CommandAborted
, or
Error
changes to TRUE. It
is impossible to know when the above output variables will change. Write your programs
so that the instruction instance executes every period
*3
while
Busy
is TRUE so that you
can monitor for changes in the output variables. For a single axis or single axes group,
the
Busy
variable of more than one instruction instance can be TRUE at the same time.
However, the output variable
Active
of only one instruction instance can be TRUE at one
time. However, the MC_Phasing (Shift Master Axis Phase) instruction is an exception to
this rule.
Output variable
Active
The output variable
Active
changes to TRUE when the instruction instance obtains per-
mission to control the applicable axis.
The output variable
Active
may change slower than the
Busy
variable.
*4
Item
Rule
Содержание 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...