MC_MoveAbsolute

MC_MoveAbsolute 1:

The function block MC_MoveAbsolute starts the positioning to an absolute target position and monitors the axis movement over the entire travel path. The "Done" output is set once the target position has been reached. Otherwise, the output "CommandAborted" or, in case of an error, the output "Error" is set.

MC_MoveAbsolute is predominantly used for linear axis systems. For modulo axes the position is not interpreted as a modulo position, but as an absolute position in continuous absolute coordinate system. Alternatively, the function block MC_MoveModulo can be used for modulo positioning.

MC_MoveAbsolute 2: Inputs

VAR_INPUT
    Execute      : BOOL;
    Position     : LREAL; 
    Velocity     : LREAL; 
    Acceleration : LREAL; 
    Deceleration : LREAL; 
    Options      : ST_MoveOptions;
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge.

Position

LREAL

Absolute target position to be used for positioning.

Velocity

LREAL

Maximum travel velocity (>0).

Acceleration

LREAL

Acceleration (>0)

Deceleration

LREAL

Deceleration (>0)

Options

ST_MoveOptions

Data structure (ST_MoveOptions) containing additional, rarely used parameters. The input can normally remain unused.

MC_MoveAbsolute 3:

See also: General rules for MC function blocks.

MC_MoveAbsolute 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_MoveAbsolute 5: Outputs

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

Name

Type

Description

Done

BOOL

TRUE when the target position has been reached.

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. 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.

MC_MoveAbsolute 6:

See also: General rules for MC function blocks.

Requirements

Development environment

PLC libraries to include

TwinCAT 3.1.4024.11

Tc3_DriveMotionControl