MCA_SetPositionContinuous (FB)
FUNCTION_BLOCK MCA_SetPositionContinuous
This function block modifies the position of an axis with a defined profile.
This function block shifts the coordinate system of an axis by manipulating either the setpoint position or the actual position of an axis. This can be used for instance for a reference situation “on the fly” where no abrupt position change is allowed, example when a slave axis is linked to the modified axis. This function block can also be used during motion without changing the commanded position, which is now positioned in the shifted coordinate system. A continuous position correction will be achieved, with a defined profile.
The function block is allowed in any state except ErrorStop or Homing. In Discrete Motion, just mode SuperImp = TRUE is possible.
The block will not change the axis state even when it results in a movement.
With SuperImp = TRUE, the axis will hold the setpoint position while an offset is applied to the actual position. This will result in a movement as the position control loop will keep the distance between setpoint- and actual position constant. A slave axis will not see this movement and will not follow. When the block is ready, the axis will have moved physically by -Distance but the positions in Axis_Ref will not have been changed.
With SuperImp = FALSE, the behavior equals MC_SetPosition, but executed continuously. The axis will physically stay where it is but the actual position and setpoint position are modified. A slave axis will follow.
With SuperImp = FALSE: When it is acceptable and required to correct the position with a jump, use Acceleration = -1.
Note
The result will be lost when using MC_SetPosition, execute a Homing, or set Enable = FALSE for CMC_Basic_Kernel.
Note
To stop the motion, the function block has to be interrupted by activating a new instance of this function block.
- InOut:
Scope
Name
Type
Comment
Input
ExecuteBOOLStarts the function block at rising edge
SuperImpBOOLDefines 2 different modes. TRUE= Superimposed movement
DistanceLREAL[u] = Technical unit, Relative distance for the motion. Range: Maximum range is 16#7FFFFFFF in increments, if configured in units, range will be limited to equivalent of 16#7FFFFFFF increments
VelocityLREAL[u/s] Value of the maximum velocity (not necessarily reached). Range: >0
AccelerationLREAL[u/s°°2] Value of the acceleration (increasing energy of the motor). Range: >0.
DecelerationLREAL[u/s°°2] Value of the deceleration (decreasing energy of the motor). Range: >0.
JerkLREAL[u/s°°3] Value of the jerk. Range: >=0
BufferModeNot supported, default mcABORTING used
Output
DoneBOOLShows the status of the function block. Done = TRUE if the execution is finished
BusyBOOLThe function block is not finished
ActiveBOOLIndicates that the function block has control on the axis
CommandAbortedBOOLCommand is aborted by another instance of this function block
ErrorBOOLSignals that error has occurred within function block
ErrorIDError identification. For error details refer to Enumeration ERROR_ID
CoveredDistanceLREALShows the progress, starts with 0 and ends with CoveredDistance = Distance. The value is valid while the function block is active
Inout
AxisReference to axis