MC_MoveAbsolute (FB)

FUNCTION_BLOCK MC_MoveAbsolute

This function block commands a controlled motion to a specified absolute position.

../../../../../../_images/plcopen.png
  • This action completes with velocity zero if no further action are pending.

  • If there is only one mathematical solution to reach the commanded position (like in linear systems), the value of the input direction is ignored.

  • For modulo axis, valid absolute position values are in the range of [0, [360, (360 is excluded), or corresponding range. The application, however, may shift the commanded position of MC_MoveAbsolute into the corresponding modulo range. For relative positions, modulo 360 is applicable.

  • The Enum type “shortest_way” is focused to a trajectory which will go through the shortest route. The decision which direction to go is based on the current position where the command is issued.

Note

With every rising edge at “Execute”, modified input parameters will be used.

Example

The following figure shows two examples of the combination of two function blocks MC_MoveAbsolute.

1. The left part of timing diagram illustrates the case if the second function block is called after the first one. If first reaches the commanded position of 6000 (and the velocity is 0) then the output Done causes the second function block to move to the position 10000.

2. The right part of the timing diagram illustrates the case if the second move function block starts the execution while the first function block is still executing. In this case the first motion is interrupted and aborted by the test signal during the constant velocity of the first Function Block. The second function block moves directly to the position 10000 although the position of 6000 is not yet reached

../../../../../../_images/MC_MoveAbsolute_Ex.png

Note

Input validation is done at the rising edge of Execute. If function block is in Active/Busy state, new value at input will not be validated. If value passed is invalid function block will continue execution with paraMaxVelocityAppl value i.e., (Max application velocity).

InOut:

Scope

Name

Type

Comment

Input

Execute

BOOL

Starts the function block at rising edge

Position

LREAL

[u] Reference position. Range: Maximum range is 16#7FFFFFFF in increments, if configured in units, range will be limited to equivalent of 16#7FFFFFFF increments

Velocity

LREAL

[u/s] Value of the maximum velocity (not necessarily reached). Range: >0. If value = 0, velocity will be equal to the parameter paraMaxVelocityAppl

Acceleration

LREAL

[u/s°°2] Value of the acceleration (increasing energy of the motor). Range: >0. If value = 0, Acceleration will be equal to parameter paraMaxAccelerationAppl

Deceleration

LREAL

[u/s°°2] Value of the deceleration (decreasing energy of the motor). Range: >0. If value = 0, Deceleration will be equal to parameter paraMaxDecelerationAppl

Jerk

LREAL

[u/s°°3] Value of the Jerk. Range: >=0

Direction

MC_Direction

Positive, shortest, negative, current, positive_stop, negative_stop, Current_Stop

BufferMode

MC_BufferMode

Not supported, default mcABORTING used

Output

Done

BOOL

Shows the status of the function block. Done = TRUE if the execution is finished

Busy

BOOL

The function block is not finished

Active

BOOL

Indicates that the function block has control on the axis

CommandAborted

BOOL

Command is aborted by another command from other PLCopen function block

Error

BOOL

Signals that error has occurred within function block

ErrorID

ERROR_ID

Error identification. For error details refer to Enumeration ERROR_ID

Inout

Axis

Axis_Ref

Reference to axis