MC_MoveVelocity
MC_MoveVelocity starts a continuous movement with specified velocity and direction. The movement can be stopped through a Stop command.
The InVelocity output is set once the constant velocity is reached. Once constant velocity has been reached, the block function is complete, and no further monitoring of the movement takes place. If the command is aborted during the acceleration phase, the CommandAborted or, on error, the Error output is set.
![]() | Motion commands can be applied to coupled slave axes, if this option was explicitly activated in the axis parameters. A motion command such as MC_MoveAbsolute then automatically leads to decoupling of the axis, after which the command is executed. In this case the only available buffer mode is Aborting. |
Inputs
VAR_INPUT
Execute : BOOL; (* B *)
Velocity : LREAL; (* E *)
Acceleration : LREAL; (* E *)
Deceleration : LREAL; (* E *)
Jerk : LREAL; (* E *)
Direction : MC_Direction := MC_Positive_Direction; (* E *)
BufferMode : MC_BufferMode; (* E *)
Options : ST_MoveOptions; (* V *)
END_VAR
Execute | The command is executed with a rising edge at Execute input. |
Velocity | Travel velocity (>0). |
Acceleration | Acceleration (≥0). If the value is 0, the standard acceleration from the axis configuration in the System Manager is used. |
Deceleration | Deceleration (≥0). If the value is 0, the standard deceleration from the axis configuration in the System Manager is used. |
Jerk | Jerk (≥0). If the value is 0, the standard jerk from the axis configuration in the System Manager is used. |
Direction | Positive or negative direction of travel of type MC_Direction. |
BufferMode | The BufferMode is analyzed, if the axis is already executing another command. The running command can be aborted, or the new command becomes active after the running command. The transition condition from the current to the next command is also defined by the BufferMode. |
Options | The data structure Options includes additional, rarely required parameters. The input can normally remain open. |
Outputs
VAR_OUTPUT
InVelocity : BOOL; (* B *)
Busy : BOOL; (* E *)
Active : BOOL; (* E *)
CommandAborted : BOOL; (* E *)
Error : BOOL; (* B *)
ErrorID : UDINT; (* E *)
END_VAR
InVelocity | The output InVelocity becomes TRUE, as soon as the constant velocity is reached. It may switch back to FALSE, if the velocity differs. The function block remains Busy and Active until a new command is issued. |
Busy | The Busy output becomes TRUE as soon as the command is started with Execute and remains TRUE as long as the function block is active. If Busy becomes FALSE again, the function block is ready for a new order. At the same time one of the outputs, CommandAborted or Error, is set. |
Active | Active indicates that the command is executed. If the command was buffered, it becomes active once a running command is completed. |
CommandAborted | Becomes TRUE, if the command could not be fully executed. The axis may have been stopped, or the running command may have been followed by a further Move command. |
Error | Becomes TRUE if an error occurs. |
ErrorID | If the error output is set, this parameter supplies the error number. |