RM_Axis – Motion control axis
Block SymbolLicensing group: MOTION CONTROL
Function Description
The RM_AXIS block is a cornerstone of the motion control solution within the REX control
system. This base block keeps all status values and implements basic algorithm for one motion
control axis (one motor), which includes limits checking, emergency stop, etc. The block is
used for both real and virtual axes. The real axis must have a position feedback controller,
which is out of this block’s scope. The key status values are commanded position, velocity,
acceleration and torque, as well as state of the axis, axis error code and a reference to the
block, which controls the axis.
This block (like all blocks in the motion control library) does not implement a feedback controller which would keep the actual position as near to the commanded position as possible. Such a controller must be provided by using other blocks (e.g. PIDU) or external (hardware) controller. The feedback signals are used for lag checking, homing and could be used in special motion control blocks.
The parameters of this block correspond with the requirements of the PLCopen standard for an axis. If improper parameters are set, the errorID output is set to -700 (invalid parameter) and all motion blocks fail with the -720 error code (general failure).
Note that the default values for position, velocity and acceleration limits are intentionally set to , which makes them invalid. Limits must always be set by the user according to the real axis and the axis actuator.
Inputs
HLD | Hold | bool |
|
|
|
ActualPos | Current position of the axis (feedback) | double |
ActualVelocity | Current velocity of the axis (feedback) | double |
ActualTorque | Current torque in the axis (feedback) | double |
LIMN | Limit switch in negative direction | bool |
LIMZ | Absolute switch or reference pulse for homing | bool |
LIMP | Limit switch in positive direction | bool |
Outputs
axisRef | Axis reference (only RM_Axis.axisRef-uAxis or yAxis-uAxis connections are allowed) | reference |
CommandedPosition | Requested (commanded) position of the axis | double |
CommandedVelocity | Requested (commanded) velocity of the axis | double |
CommandedAcceleration | Requested (commanded) acceleration of the axis | double |
CommandedTorque | Requested (commanded) torque in the axis | double |
iState | State of the axis | long |
|
|
|
ErrorID | Error code | error |
|
|
|
Parameters
AxisType | Type of the axis 1 | long |
|
|
|
EnableLimitPos | Enable positive position limit checking | bool |
SWLimitPos | Positive position limit for application (MC blocks) | double |
MaxPosSystem | Positive position limit for system | double |
EnableLimitNeg | Enable negative position limit checking | bool |
SWLimitNeg | Negative position limit for application (MC blocks) | double |
MinPosSystem | Negative position limit for system | double |
EnablePosLagMonitor | Enable monitoring of position lag | bool |
MaxPositionLag | Maximal position lag | double |
MaxVelocitySystem | Maximal allowed velocity for system | double |
MaxVelocityAppl | Maximal allowed velocity for application (MC blocks) | double |
MaxAccelerationSystem | Maximal allowed acceleration for system | double |
MaxAccelerationAppl | Maximal allowed acceleration for application (MC blocks) | double |
MaxDecelerationSystem | Maximal allowed deceleration for system | double |
MaxDecelerationAppl | Maximal allowed deceleration for application (MC blocks) | double |
MaxJerk | Maximal allowed jerk [unit/] | double |
MaxTorque | Maximal motor torque/force (0=not used) | double |
kta | Torque-Acceleration ratio | double |
ReverseLimit | Invert meaning of LIMN, LIMZ and LIMP inputs | bool |
Example
Following example illustrates basic principle of use of motion control blocks. It presents the
minimal configuration which is needed for operation of a physical or virtual axis. The axis is
represented by RM_Axis block. The limitations imposed on the motion trajectory in form of
maximum velocity, acceleration, jerk and position have to be set in parameters of the RM_Axis
block. The inputs can be connected to supply the values of actual position, speed and torque
(feedback for slip monitoring) or logical limit switch signals for homing procedure. The
axisRef output signal needs to be connected to any motion control block related to the
corresponding axis. The axis has to be activated by enabling the MC_Power block. The state
of the axis changes from Disabled to Standstill (see the following state transition
diagram) and any discrete, continuous or synchronized motion can be started by
executing a proper functional block (e.g. MC_MoveAbsolute). The trajectory of motion in
form of desired position, velocity and acceleration is generated in output signals of
the RM_Axis block. The reference values are provided to an actuator control loop
which is implemented locally in REX control system in the same or different task
or they are transmitted via a serial communication interface to end device which
controls the motor motion (servo amplifier, frequency inverter etc.). In case of any
error, the axis performs an emergency stop and indicates the error ID. The error has
to be confirmed by executing the MC_Reset block prior to any subsequent motion
command. The following state diagram demonstrates the state transitions of an
axis.
Axis state transition diagram
Motion blending
According to PLCOpen specification, number of motion control blocks allow to specify
BufferMode parameter, which determines a behaviour of the axis in case that a motion
command is interrupted by another one before the first motion is finished. This transition from
one motion to another (called "Blending") can be handled in various ways. The following table
presents a brief explanation of functionality of each blending mode and the resulting shapes of
generated trajectories are illustrated in the figure. For detailed description see full PLCOpen
specification.
Aborting | The new motion is executed immediately |
Buffered | the new motion is executed immediately after finishing the previous one, there is no blending |
Blending low | the new motion is executed immediately after finishing the previous one, but the axis will not stop between the movements, the first motion ends with the lower limit for maximum velocity of both blocks at the first end-position |
Blending high | the new motion is executed immediately after finishing the previous one, but the axis will not stop between the movements, the first motion ends with the higher limit for maximum velocity of both blocks at the first end-position |
Blending previous | the new motion is executed immediately after finishing the previous one, but the axis will not stop between the movements, the first motion ends with the limit for maximum velocity of first block at the first end-position |
Blending next | the new motion is executed immediately after finishing the previous one, but the axis will not stop between the movements, the first motion ends with the limit for maximum velocity of second block at the first end-position |
Illustration of blending modes
[Back to top] [Up] [Next]