MC_MoveAbsolute (FB)

 

FUNCTION_BLOCK MC_MoveAbsolute

This function block causes the axis to be moved to an absolute position and uses the values for Velocity, Deceleration, Acceleration and Jerk. If no further actions are pending, the execution ends with velocity 0. (See: standstill)

Example

Use of MC_MoveAbsolute

The following illustration shows two possibilities for combining two instances (First and Second) of the type MC_MoveAbsolute. In the left-hand part of the diagram the Second instance is called after the First instance.

If First has reached the specified position of 6000 and the input Velocity is 0, then the Done output will cause the Second instance to move the axis to the position 10000. In the right-hand part of the diagram, the execution is started by Second while First is still operating.

The motion caused by First is interrupted and aborted by the Test signal which is transmitted during the constant velocity phase of First. Second steers directly to position 10000, even though position 6000 has not yet been reached.

MoveAbsoluteExample.png

InOut:

Scope

Name

Type

Initial

Comment

Inout

Axis

AXIS_REF_SM3

Input

Execute

BOOL

FALSE

TRUE: Starts execution.

Position

LREAL

0

Target position of the motion

  • In technical units [u])

  • Can be negative or positive.

For modulo axes, valid absolute position values lie within the range of [0, 360[. 360 is thus excluded. The range can be adapted. The application can shift the set position of MC_MoveAbsolute into the appropriate modulo range. Modulo 360 can be used for relative positions.

Velocity

LREAL

0

Maximum velocity

  • In [u/s]

  • Is always positive.

  • Does not need to be achieved.

Acceleration

LREAL

0

Acceleration

  • In [u/s²]

  • Is always positive.

  • Increasing motor energy

Deceleration

LREAL

0

Deceleration

  • In [u/s²]

  • Is always positive.

  • Decreasing motor energy

Jerk

LREAL

0

Jerk in [u/s³]

Direction

MC_Direction

shortest

Permitted values for MC_DIRECTION

  • For linear axis

    • positive

    • negative

  • For rotary axis

    • positive

    • negative current

    • shortest: Sets to a track that describes the shortest path. The choice of direc­tion is based on the position at the time of the command call.

    • fastest

If there is only one mathematical solution for reaching the target position, as for example in a linear system, then the value of the Direction input is ignored.

Output

Done

BOOL

FALSE

TRUE: End position has been achieved.

Busy

BOOL

FALSE

TRUE: Function block is in operation.

If no further actions are pending, the execution ends with velocity 0.

CommandAborted

BOOL

FALSE

TRUE: The execution is interrupted by an other function block.

Error

BOOL

FALSE

TRUE: Error has occurred.

ErrorID

SMC_ERROR

0

Error identification