MC_MoveContinuousAbsolute (FB)

FUNCTION_BLOCK MC_MoveContinuousAbsolute

This function block commands a controlled motion to a specified absolute position ending with the specified velocity.

../../../../../../_images/plcopen.png
  • If the commanded position is reached and no new motion command is put into the buffer, the axis continues to run with the specified “EndVelocity”.

  • The function block will start the axis with state DiscreteMotion, while positioning.

  • It will change to state Continuous Motion (meaning: it will not stop by itself) with EndVelocity <> 0.

  • It will change to standstill with EndVelocity = 0.

One use case for MC_MoveContinuousAbsolute is a linear cutter. One linear axis that is carrying a laser device that is used to cut a workpiece

Start from lrIdlePos.

../../../../../../_images/MC_MoveContinuousAbsolute_linearcutter_1.png
  1. Move the laser with fast velocity over the position lrStartCutPos. The laser is off during this movement

../../../../../../_images/MC_MoveContinuousAbsolute_linearcutter_2.png
  1. Turn back and make sure to have the speed lrCutVelocity when at lrStartCutPos. At this position, switch the laser on

../../../../../../_images/MC_MoveContinuousAbsolute_linearcutter_3.png
  1. Travel over the work piece with this constant speed while the laser is on

../../../../../../_images/MC_MoveContinuousAbsolute_linearcutter_4.png
  1. When reaching lrEndCutPos switch off the laser and move back to idle position with fast velocity

../../../../../../_images/MC_MoveContinuousAbsolute_linearcutter_5.png

During the cutting process the laser must be moved with a fix velocity, no acceleration or deceleration phase can be tolerated. The laser must be moved to its waiting position after the cutting is done

Example

The explained movement can be achieved with the function block MC_MoveContinuousAbsolute in the following way:

../../../../../../_images/MC_MoveContinuousAbsolute_Ex1.png

Started with a rising edge of xStartCuttingCycle, the instance “mca” of MC_MoveContinuousAbsolute will move the axis with “lrFastVelocity” over “lrStartCutPos”, turn back and have the speed “lrCutVelocity” when reaching “lrStartCutPos” again in negative direction. In this point in time, “InEndVelocity” is set and the laser is switched on. As no other motion function block interrupts this movement, MC_MoveContinuousAbsolute will keep travelling in negative direction with the current speed. After the axis has overstepped the position “lrEndPos”, where the laser is switched off, the MC_MoveAbsolute instance “ma” moves the axis with high speed to its idle position

../../../../../../_images/MC_MoveContinuousAbsolute_Ex2.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 last valid value.

InOut:

Scope

Name

Type

Comment

Input

Execute

BOOL

Starts the function block at rising edge

ContinuousUpdate

BOOL

Decide if new input parameters are processed during the movement

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

EndVelocity

LREAL

[u/s] Signed value for the end veloicty, determines the direction when ending the positioning movement

Velocity

LREAL

[u/s] Value of the maximum velocity (not necessarily reached). Range: >0

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.If value > 0 and <= 1,Acceleration will be limited to 1.

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.If value > 0 and <= 1,Deceleration will be limited to 1.

Jerk

LREAL

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

Direction

MC_Direction

Positive, Shortest, Negative, Current

BufferMode

MC_BufferMode

Not supported, default mcABORTING used

Output

InEndVelocity

BOOL

Commanded position finally reached

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