MC_MoveContinuousAbsolute

MC_MoveContinuousAbsolute 1:

The function block MC_MoveContinuousAbsolute starts the positioning to an absolute target position and monitors the axis movement over the entire travel path. At the target position a constant end velocity is reached, which is maintained. The "InEndVelocity" output is set once the target position was reached. Otherwise, the output "CommandAborted" or, in case of an error, the output "Error" is set.

Once the target position has been reached, the function of the function block is terminated and the axis is no longer monitored.

MC_MoveContinuousAbsolute 2:

MC_MoveContinuousAbsolute is not implemented for high/low speed axes.

MC_MoveContinuousAbsolute 3: Inputs

VAR_INPUT
    Execute      : BOOL;
    Position     : LREAL; 
    Velocity     : LREAL; 
    EndVelocity  : LREAL; 
    Acceleration : LREAL; 
    Deceleration : LREAL; 
    Jerk         : LREAL;
    BufferMode   : MC_BufferMode;
    Options      : ST_MoveOptions;
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge.

Position

LREAL

Absolute target position

Velocity

LREAL

Maximum velocity for the movement to the target position (>0).

EndVelocity

LREAL

End velocity to be maintained once the target position has been reached.

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

Jerk (≥0)
At a value of 0, the standard jerk from the axis configuration in the System Manager is applied.

BufferMode

MC_BufferMode

Is evaluated if the axis is already executing another command. MC_MoveContinuousAbsolute becomes active after the current command or aborts it. Transition conditions from the current to the next command are also determined by the BufferMode. A second function block is always required to use the BufferMode. It is not possible to trigger a move function block with new parameters while it is active.

Options

ST_MoveOptions

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

See also: General rules for MC function blocks

MC_MoveContinuousAbsolute 4: 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_MoveContinuousAbsolute 5: Outputs

VAR_OUTPUT
    InEndVelocity  : BOOL;
    Busy           : BOOL;
    Active         : BOOL;
    CommandAborted : BOOL;
    Error          : BOOL;
    ErrorID        : UDINT;
END_VAR

Name

Type

Description

InEndVelocity

BOOL

TRUE when the target position has been reached.
The function block remains "Busy" and "Active" until a new command is issued.

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 "CommandAborted" or "Error" is set.

Active

BOOL

Indicates that the command is executed. If the command was buffered, it becomes active once a running command is completed.

CommandAborted

BOOL

TRUE if the command could not be executed completely. The axis was stopped or the current command was replaced by another Move command.

Error

BOOL

TRUE, if an error occurs.

ErrorID

UDINT

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

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