MC_MoveSuperImposed

MC_MoveSuperImposed 1:

The function block MC_MoveSuperImposed starts a relative superimposed movement while the axis is already moving. The current movement is not interrupted. The "Done" output is set once the superimposed movement is completed. The original subordinate movement may continue to be active and is monitored by the associated Move function block.

The function of the superimposition becomes clear when considering two axes that operate with the same velocity. If one of the axes is superimposed by MC_MoveSuperImposed, it moves ahead or behind by the "Distance" parameter. Once the superimposed movement is completed, the "Distance" between the two axes is maintained.

MC_MoveSuperImposed can be executed on single axes as well as on master or slave axes. In a slave axis, the superimposed movement acts solely on the slave axis. If the function is applied to a master axis, the slave mimics the superimposed movement of the master due to the axis coupling.

Since MC_MoveSuperImposed executes a relative superimposed movement, the target position for the subordinate travel command changes by Distance.

The superimposed movement depends on the position of the main movement. This means that a velocity change of the main movement also results in a velocity change in the superimposed movement, and that the superimposed movement is inactive if the main movement stops. The "Options" parameter can be used to specify whether the superimposed movement is to be aborted or continued if the main movement stops.

See also: Application examples for MC_MoveSuperImposed

MC_MoveSuperImposed 2: Inputs

VAR_INPUT
    Execute         : BOOL; 
    Mode            : E_SuperpositionMode;
    Distance        : LREAL; 
    VelocityDiff    : LREAL; 
    Acceleration    : LREAL; 
    Deceleration    : LREAL; 
    Jerk            : LREAL; 
    VelocityProcess : LREAL; 
    Length          : LREAL; 
    Options         : ST_SuperpositionOptions; 
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge.

Mode

E_SuperpositionMode

Determines the type of the superimposed motion. (Type: E_SuperpositionMode)

Distance

LREAL

Relative distance to catch up. A positive value means an increase in velocity by an amount required to cover the additional distance, compared with the unaffected movement. A negative value results in braking and falling back by this distance.

VelocityDiff

LREAL

Maximum velocity difference to the current velocity (basic velocity) of the axis (>0). For this parameter a distinction may have to be made, depending on the superimposition direction (acceleration or deceleration). If, for example, a direction reversal is not permitted, the maximum available acceleration corresponds to the maximum velocity, and the maximum deceleration to stop. Therefore, there are two possible maximum values for "VelocityDiff":

  • Distance > 0 (axis accelerates)
    VelocityDiff = maximum velocity -basic velocity
  • Distance < 0 (axis decelerates)
    VelocityDiff = basic velocity

Acceleration

LREAL

Acceleration (≥0). If the value is 0, the standard acceleration from the axis configuration in the System Manager is used.

Deceleration

LREAL

Deceleration (≥0). If the value is 0, the standard deceleration from the axis configuration in the System Manager is used.

Jerk

LREAL

The Jerk parameter is not implemented.

VelocityProcess

LREAL

Mean process velocity in the axis (>0). If the basic velocity during superposition is constant, the set axis velocity can be specified.

Length

LREAL

Distance over which the superimposed movement is available. The "Mode" parameter defines how this distance is interpreted.

Options

ST_SuperpositionOptions

Data structure containing additional, rarely used parameters. The input can normally remain open.

  • AbortOption: defines the behavior when the subordinate movement stops. The superimposed movement can be aborted or continued later.

See also: General rules for MC function blocks

MC_MoveSuperImposed 3: Inputs/outputs

VAR_IN_OUT
    Axis : AXIS_REF;
END_VAR

Name

Type

Description

Axis

AXIS_REF

Axis data structure that unambiguously addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state.

MC_MoveSuperImposed 4: Outputs

VAR_OUTPUT
    Done               : BOOL;
    Busy               : BOOL;
    Active             : BOOL;
    CommandAborted     : BOOL;
    Error              : BOOL;
    ErrorID            : UDINT;
    Warning            : BOOL;
    WarningID          : UDINT;
    ActualVelocityDiff : LREAL;
    ActualDistance     : LREAL;
    ActualLength       : LREAL;
    ActualAcceleration : LREAL;
    ActualDeceleration : LREAL;
END_VAR

Name

Type

Description

Done

BOOL

TRUE if the superimposed movement was successfully completed.

Busy

BOOL

TRUE as soon as the command is started with "Execute" and as long as the movement command is processed. If "Busy" is FALSE, the function block is ready for a new order. At the same time, one of the outputs "Done", "CommandAborted" or "Error" is set.

Active

BOOL

Indicates that the command is executed.

CommandAborted

BOOL

Becomes TRUE, if the command was aborted by another command and could therefore not be completed.

Error

BOOL

TRUE, if an error occurs.

ErrorID

UDINT

If the error output is set, this parameter supplies the error number.

Warning

BOOL

TRUE if the action cannot be executed completely.

WarningID

UDINT

The function block returns warning 4243hex (16963) if the compensation was incomplete due to the parameterization (distance, velocity, etc.). In this case compensation is implemented as far as possible. The user has to decide whether to interpret this warning message within his application as a proper error or merely as a warning.

ActualVelocityDiff

LREAL

Actual velocity difference during the superimposed motion (ActualVelocityDiff ≤ VelocityDiff).

ActualDistance

LREAL

Actual superimposed distance. The function block tries to reach the full "Distance" as specified. Depending on the parameterization ("VelocityDiff", "Acceleration", "Deceleration", "Length", "Mode") this distance may not be fully reached. In this case the maximum possible distance is superimposed. (ActualDistance ≤ Distance).

ActualLength

LREAL

Actual travel during superimposed motion (ActualLenght ≤ Length).

ActualAcceleration

LREAL

Actual acceleration of the superimposed movement (ActualAcceleration ≤ Acceleration).

ActualDeceleration

LREAL

Actual deceleration of the superimposed movement (ActualDeceleration ≤ Deceleration).

See also: General rules for MC function blocks

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.0.0

PC or CX (x86 or x64)

Tc2_MC2