158 Rockwell Automation Publication 2080-UM002M-EN-E - April 2022
Chapter 8 Motion Control
Axis Elements and Data Types
Axis_Ref Data Type
Axis_Ref is a data structure that contains information on a motion axis. It is
used as an input and output variable in all motion function blocks. One
axis_ref instance is created automatically in the Connected Components
Workbench software when the user adds one motion axis to the configuration.
The user can monitor this variable in controller debug mode through the
software when the motion engine is active, or in the user application as part of
user logic. It can also be monitored remotely through various communication
channels.
MC_MoveVelocity Supported Direction Types
Direction Type
Value Used
(1)
(1) Data type: short integer.
Direction Description
Positive direction 1
Specific for motion/rotation direction.
Also called clockwise direction for rotation motion.
Current direction 0
Current direction instructs the axis to continue its motion with
new input parameters, without direction change.
The direction type is valid only when the axis is moving and the
MC_MoveVelocity is called.
Negative direction -1
Specific for motion/rotation direction.
Also referred to as counter-clockwise direction for rotation
motion.
Data Elements for Axis_Ref
Element Name Data Type Description
Axis_ID UINT8
The logic axis ID automatically assigned by the Connected Components
Workbench software. This parameter cannot be edited or viewed by user.
ErrorFlag UINT8 Indicates whether an error is present in the axis.
AxisHomed UINT8
Indicates whether homing operation is successfully executed for the axis
or not.
When the user tries to redo homing for an axis with AxisHomed already set
(homing performed successfully), and the result is not successful, the
AxisHomed status will be cleared.
ConsVelFlag UINT8
Indicates whether the axis is in constant velocity movement or not.
Stationary axis is not considered to be in constant velocity.
AccFlag UINT8 Indicates whether the axis is in an accelerating movement or not.
DecFlag UINT8 Indicates whether the axis is in a decelerating movement or not.
AxisState UINT8
Indicates the current state of the axis. For more information, see Axis
States on page 153.
ErrorID UINT16
Indicates the cause for axis error when error is indicated by ErrorFlag. This
error usually results from motion function block execution failure.
See Motion Function Block and Axis Status Error ID
on page 161.
ExtraData UINT16 Reserved.
TargetPos
REAL
(float)
(1)
Indicates the final target position of the axis for MoveAbsolute and
MoveRelative function blocks.
For MoveVelocity, Stop, and Halt function blocks, TargetPos is 0 except
when the TargetPos set by previous position function blocks is not cleared.