MCA_SetPositionContinuous (FB)

FUNCTION_BLOCK MCA_SetPositionContinuous

This function block modifies the position of an axis with a defined profile.

../../../../../../_images/plcopen.png

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

Execute

BOOL

Starts the function block at rising edge

SuperImp

BOOL

Defines 2 different modes. TRUE= Superimposed movement

Distance

LREAL

[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

Velocity

LREAL

[u/s] Value of the maximum velocity (not necessarily reached). Range: >0

Acceleration

LREAL

[u/s°°2] Value of the acceleration (increasing energy of the motor). Range: >0.

Deceleration

LREAL

[u/s°°2] Value of the deceleration (decreasing energy of the motor). Range: >0.

Jerk

LREAL

[u/s°°3] Value of the jerk. Range: >=0

BufferMode

MC_BufferMode

Not supported, default mcABORTING used

Output

Done

BOOL

Shows the status of the function block. Done = TRUE if the execution is finished

Busy

BOOL

The function block is not finished

Active

BOOL

Indicates that the function block has control on the axis

CommandAborted

BOOL

Command is aborted by another instance of this function block

Error

BOOL

Signals that error has occurred within function block

ErrorID

ERROR_ID

Error identification. For error details refer to Enumeration ERROR_ID

CoveredDistance

LREAL

Shows the progress, starts with 0 and ends with CoveredDistance = Distance. The value is valid while the function block is active

Inout

Axis

Axis_Ref

Reference to axis