6 Motion Control Programming
6-8
NJ-series CPU Unit Motion Control User’s Manual (W507)
6-4
Execution and Status of Motion
Control Instructions
Variables that represent the execution status of instructions and variables that are used to execute
motion control instructions are defined in the MC Function Module. There are two input variables that
you use to execute motion control instruction functions:
Execute
and
Enable
. The following output vari-
ables indicate the execution status of an instruction:
Busy, Done, CommandAborted
, and
Error.
The basic rules for the MC Function Module are listed in the following table. You can find execution
examples in
. Refer to these examples as well.
6-4-1
Basic Rules for Execution of Instructions
Item
Rule
Exclusiveness of out-
puts
The following output variables are exclusively controlled and only one of them can be
TRUE at the same time:
Busy
,
Done
,
Error
, and
CommandAborted
.
Similarly, only one of the following output variables can be TRUE at the same time:
Active
,
Done
,
Error
, and
CommandAborted
.
Busy
and
Active
may be TRUE at the same time in some cases.
Output status
The output variables
Done
,
InGear
(Gear Ratio Achieved),
InSync
,
InVelocity
(Target
Velocity Reached), and
CommandAborted
change to FALSE when the input variable
Execute
changes to FALSE. The actual execution of a motion control instruction is not
stopped when
Execute
changes to FALSE. Even if
Execute
changes to FALSE before the
instruction finishes execution, the corresponding output variable will be TRUE for at least
one period if the status of the instruction instance changes.
The output variable
Error
will not reset to FALSE and the output variable
ErrorID
(Error
Code) will not reset to 0 until you execute one of the following instructions: MC_Reset,
MC_GroupReset, or ResetMCError.
*1
If the
Execute
variable of the same instruction instance changes to TRUE again (i.e., if
the instruction is restarted) during the execution of a motion control instruction, the
Com-
mandAborted
variable will not change to TRUE.
Input parameters
For motion control instructions that are started with the input variable
Execute
, the values
of the input parameters when
Execute
changes to TRUE are used. For motion control
instructions that start for the input variable
Enable
, the current values of the input param-
eters during each period when
Enable
is TRUE are used.
Omitting input param-
eters
The default value applies if you omit an input parameter for an instruction instance.
*2
Position
(Target Posi-
tion) and
Distance
(Travel Distance)
The input variable
Position
is defined as a value in the coordinate system. The input vari-
able
Distance
is the relative length, i.e., it is the difference between two positions.
Sign rules
The input variables
Acceleration
,
Deceleration
, and
Jerk
are non-negative values.
Posi-
tion
(Target Position),
Distance
(Travel Distance), and
Velocity
(Target Velocity) can be
positive, negative, or 0.
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...