MC_MoveVelocity (FB)¶
FUNCTION_BLOCK MC_MoveVelocity
This function block causes an endless motion at a specified velocity.
- Example
- Use of
MC_MoveVelocityThe following illustration shows how two instances (FirstandSecond) of the function blockMC_MoveVelocityare combined. In the left-hand part of the illustration theSecondinstance is called after theFirstinstance. IfFirstachieves the specified velocity 3000, then theFirstoutputInVelocityis ANDed with theNextsignal. This causesSecondto move at velocity 2000.In the right-hand part of the illustration the execution is started byFirst, which aborts the previously executedSecondinstance and therefore the outputInVelocityof theSecondinstance is set to False. AlthoughFirstis still accelerating in order to reach velocity 3000, it is interrupted and aborted because theTestsignal starts the execution ofSecond. NowSecondwill decelerate the velocity to 2000 after which theInVelocityof theSecondinstance is set to TRUE.
- InOut:
Scope
Name
Type
Initial
Comment
Inout
AxisReference to axis
Input
ExecuteBOOLTRUE: Starts execution.VelocityLREALMaximum velocity in techincal units per second [u/s].
Is always positive.
AccelerationLREALAcceleration in [u/s²].
Is always positive.
Increasing motor energy
DecelerationLREALDeceleration in [u/s²].
Is always positive.
Decreasing motor energy
JerkLREALMaximum magnitude of jerk in [u/s³]
Directioncurrent
The direction of the movement. Only current, positive, and negative are allowed.
BufferModeMC_BUFFER_MODEDefines the chronological sequence of the FB relative to the previous block. If the function block is Busy, then only BufferMode=Aborting is allowed.
Output
InVelocityBOOLTRUE: The set velocity has been reached for the first time.BusyBOOLTRUE: Function block is in operation.ActiveBOOLIndicates that the FB has control on the axis
CommandAbortedBOOLFALSE
TRUE: Execution has been interrupted by another function block instance operating on the axis.ErrorBOOLTRUE: Error has occurred.ErrorIDSMC_ERRORError identification