MC_MoveVelocity (FB)

 

FUNCTION_BLOCK MC_MoveVelocity

This function block causes an endless motion at a specified velocity.

Example

Use of MC_MoveVelocity

The following illustration shows how two instances (First and Second) of the function block MC_MoveVelocity are combined. In the left-hand part of the illustration the Second instance is called after the First instance. If First achieves the specified velocity 3000, then the First output InVe­locity is ANDed with the Next signal. This causes Second to move at velocity 2000.

In the right-hand part of the illustration the execution is started by Second´´, as long as the ``InVelocity´´ output of ``First has not yet been set to TRUE and First is still being executed. Although First is still accel­erating in order to reach velocity 3000, it is interrupted and aborted because the Test signal starts the execution of Second. Now Second will decelerate the velocity to 2000.

MoveVelocityExample.png

InOut:

Scope

Name

Type

Initial

Comment

Inout

Axis

AXIS_REF_SM3

Reference to axis

Input

Execute

BOOL

TRUE: Starts execution.

Velocity

LREAL

Maximum velocity

  • Positive in [u/s]

  • Does not need to be achieved.

Acceleration

LREAL

Acceleration

  • Positive in [u/s²]

  • Increasing motor energy

Deceleration

LREAL

Deceleration

  • Positive in [u/s²]

  • Decreasing motor energy

Jerk

LREAL

Is always positive in [u/s³].

Direction

MC_Direction

current

For modulo-axis

Output

InVelocity

BOOL

TRUE: The set velocity has been reached for the first time.

Busy

BOOL

TRUE: Function block is in operation.

CommandAborted

BOOL

TRUE: Execution has been interrupted by another function block instance operating on Axis.

Error

BOOL

TRUE: Error has occurred.

ErrorID

SMC_ERROR

Error identification