MC_MoveAbsolute_BkPlcMc (from V3.0)

MC_MoveAbsolute_BkPlcMc (from V3.0) 1:

This function block starts and monitors the movement of an axis.

MC_MoveAbsolute_BkPlcMc (from V3.0) 2: Inputs

VAR_INPUT
    Execute:        BOOL;
    Position:       LREAL;
    Velocity:       LREAL;
    Acceleration:   LREAL;
    Deceleration:   LREAL;
    Jerk:           LREAL;
    Direction:      MC_Direction_BkPlcMc:=MC_Shortest_Way_BkPlcMc;   (ab/from V3.0.8)
    BufferMode:     MC_BufferMode_BkPlcMc:=Aborting_BkPlcMc;        (ab/from V3.0.8)
END_VAR

Name

Type

Description

Execute

BOOL

The movement is initiated by a rising edge at this input.

Position

LREAL

[mm] The target position of the movement in actual value units of the axis.

Velocity

LREAL

[mm/s] The required motion velocity in actual value units of the axis per second.

Acceleration

LREAL

[mm/s2] The required acceleration in actual value units of the axis per square second. If this parameter is 0.0, it is replaced by a default value from the axis parameters.

Deceleration

LREAL

[mm/s2] The required deceleration in actual value units of the axis per square second. If this parameter is 0.0, it is replaced by a default value from the axis parameters.

Jerk

LREAL

[mm/s3] reserved.

Direction

MC_Direction_BkPlcMc

reserved. This input was only amended for compatibility reasons and either should not be assigned, or the constant MC_Shortest_Way_BkPlcMc should be assigned to it. (from V3.0.8)

BufferMode

MC_BufferMode_BkPlcMc

reserved. This input is provided in preparation for a future build. It should currently either not be assigned or assigned the constant Aborting_BkPlcMc. (from V3.0.8)

MC_MoveAbsolute_BkPlcMc (from V3.0) 3: Inputs/outputs

VAR_INOUT
    Axis:           Axis_Ref_BkPlcMc;
END_VAR

Name

Type

Description

Axis

Axis_Ref_BkPlcMc

Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred.

MC_MoveAbsolute_BkPlcMc (from V3.0) 4: Outputs

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

Name

Type

Description

Busy

BOOL

Indicates that a command is being processed.

Done

BOOL

Successful processing of the movement is indicated here.

CommandAborted

BOOL

Abortion of the movement is indicated here.

Error

BOOL

The occurrence of an error is indicated here.

ErrorID

UDINT

An encoded indication of the cause of the error is provided here.

Behavior of the function block

On a rising edge at Execute the function block checks the transferred axis interface. A number of problems can be detected and reported during this process:

The movement begins if these checks can be carried out without problems. This is done by limiting the parameters Position, Velocity, Acceleration and Deceleration to the maximum permissible values and passing them to the motion algorithm. The axis is now in the McState_DiscreteMotion state, and the function block begins to monitor the movement.

If the motion algorithm reports an error code while the movement is being executed, the system responds with Error and ErrorID:=the motion algorithm's error code. If completion of the movement is prevented by the activity of another function block, the system responds with CommandAborted. If the motion algorithm achieves the target conditions for the axis, the system responds with Done.

A falling edge at Execute clears all the pending output signals. If, while the movement is still active, Execute is set to FALSE, execution of the movement that had started continues unaffected. The signals provided at the end of the movement (Error, ErrorID, CommandAborted, Done) are made available for one cycle.