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
andSecond
) of the function blockMC_MoveVelocity
are combined. In the left-hand part of the illustration theSecond
instance is called after theFirst
instance. IfFirst
achieves the specified velocity 3000, then theFirst
outputInVelocity
is ANDed with theNext
signal. This causesSecond
to move at velocity 2000.In the right-hand part of the illustration the execution is started byFirst
, which aborts the previously executedSecond
instance and therefore the outputInVelocity
of theSecond
instance is set to False. AlthoughFirst
is still accelerating in order to reach velocity 3000, it is interrupted and aborted because theTest
signal starts the execution ofSecond
. NowSecond
will decelerate the velocity to 2000 after which theInVelocity
of theSecond
instance is set to TRUE.
- InOut:
Scope
Name
Type
Initial
Comment
Inout
Axis
Reference to axis
Input
Execute
BOOL
TRUE
: Starts execution.Velocity
LREAL
Maximum velocity in techincal units per second [u/s].
Is always positive.
Acceleration
LREAL
Acceleration in [u/s²].
Is always positive.
Increasing motor energy
Deceleration
LREAL
Deceleration in [u/s²].
Is always positive.
Decreasing motor energy
Jerk
LREAL
Maximum magnitude of jerk in [u/s³]
Direction
current
The direction of the movement. Only current, positive, and negative are allowed.
BufferMode
MC_BUFFER_MODE
Defines the chronological sequence of the FB relative to the previous block. If the function block is Busy, then only BufferMode=Aborting is allowed.
Output
InVelocity
BOOL
TRUE
: The set velocity has been reached for the first time.Busy
BOOL
TRUE
: Function block is in operation.Active
BOOL
Indicates that the FB has control on the axis
CommandAborted
BOOL
FALSE
TRUE
: Execution has been interrupted by another function block instance operating on the axis.Error
BOOL
TRUE
: Error has occurred.ErrorID
SMC_ERROR
Error identification