MC_MoveSuperimposed

MC_MoveSuperimposed 1:

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 superposition function becomes clear, if one considers two axes moving at the same speed. If one of the axes is superimposed by MC_MoveSuperimposed, it will precede or follow the other axis as determined by the Distance parameter. Once the superimposed movement is completed, the Distance between the two axes is maintained.

MC_MoveSuperimposed can be applied to single axes, master axes or slave axes. For a slave axis the superimposed movement only affects the slave axis. If the function is used for a master axis, the slave will follow the superimposed movement of the due 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.

Application examples for MC_MoveSuperimposed

Inputs


VAR_INPUT
Execute : BOOL; (* B *)
Mode : E_SuperpositionMode;
Distance : LREAL; (* B *)
VelocityDiff : LREAL; (* E *)
Acceleration : LREAL; (* E *)
Deceleration : LREAL; (* E *)
Jerk : LREAL; (* E *)
VelocityProcess : LREAL; (* V *)
Length : LREAL; (* V *)
Options : ST_SuperpositionOptions; (* V *)
END_VAR

ST_SuperpositionOptions E_SuperpositionMode

Execute

The command is executed with a rising edge at input Execute.

Mode

Mode determines the type of the superimposed motion.

Distance

Relative distance to catch up. A positive value means 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

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:
1. 1. Distance > 0 (axis accelerates)
VelocityDiff = maximum speed - basic speed
2. Distance > 0 (axis decelerates)
VelocityDiff = basic speed

Acceleration

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

Deceleration

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

Jerk

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

VelocityProcess :

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

Length

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

Options

The data structure option includes additional, rarely required parameters. The input can normally remain open.

Options.

AbortOption

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

General rules for MC function blocks

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

Done

The Done output becomes TRUE, once the superimposed movement was completed successfully.

Busy

The Busy output becomes TRUE when the command is started with Execute and remains TRUE as long as the movement command is processed. If Busy becomes FALSE again, the function block is ready for a new job. At the same time one of the outputs, Done, CommandAborted or Error, is set.

Active

Active indicates that the command is executed

CommandAborted

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

Error

Becomes TRUE if an error occurs.

ErrorID

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

Warning

Warning becomes TRUE if the action cannot be executed completely.

WarningID

The 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:

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

ActualDistance:

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

ActualLength

Actual travel during superimposed motion (ActualLenghtLength).

ActualAcceleration

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

ActualDeceleration

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

General rules for MC function blocks

Inputs/outputs


VAR_IN_OUT
Axis : AXIS_REF;
END_VAR

AXIS_REF

Axis

Axis data structure

The axis data structure of type AXIS_REF addresses an axis uniquely within the system. Among other parameters it contains the current axis status, including position, velocity or error status.