MC_MoveVelocity

Function block MC_MoveVelocity
Commands a never-ending controlled motion at a specified velocity.
VAR_IN_OUT
B AxisIn AXIS_REF Reference to an axis.
VAR_INPUT
B Execute BOOL Starts the motion at rising edge.
E ContinuousUpdate BOOL If TRUE, when the function block (FB) is running and the values of the parameters are updated, the FB will use the new value. If FALSE, the FB won't use the new value.
B Velocity LREAL Value of the specified velocity. [unit/second]
E Acceleration LREAL Value of the acceleration. The unit is determined by MC_ProfileType. (increasing energy of the motor) [unit/second2] or [second]
E Deceleration LREAL Value of the deceleration. The unit is determined by MC_ProfileType. (decreasing energy of the motor) [unit/second2] or [second]
E Jerk LREAL Value of the jerk. The unit is determined by MC_ProfileType. [unit/second3] or [second]
E Direction MC_Direction The moving direction of an axis. mcShortestWay is not applicable.
E BufferMode MC_BufferMode Defines how to blend the velocity of two function blocks.
VAR_OUTPUT
B InVelocity BOOL Commanded velocity reached.
E Busy BOOL The function block is not finished and new output values are to be expected.
E Active BOOL The function block is controlling the axis.
E CommandAborted BOOL The command is aborted by another command.
B Error BOOL Signals that an error has occurred within the function block.
E ErrorID MC_Error Error identification.
  • To stop the motion, the function block (FB) has to be interrupted by another FB issuing a new command.
  • The signal InVelocity has to be reset when the block is aborted by another block.
  • For more information about how the blending modes work, see Concepts > Blend movements.

 

  MC_MoveVelocity  
AXIS_REF   AxisIn   Axis   AXIS_REF
BOOL   Execute   InVelocity   BOOL
BOOL   ContinuousUpdate   Busy   BOOL
LREAL   Distance   Active   BOOL
LREAL   Velocity   CommandAborted   BOOL
LREAL   Acceleration   Error   BOOL
LREAL   Deceleration   ErrorID   MC_Error
MC_Direction   Direction        
MC_BufferMode   BufferMode        
             

The following figure shows two examples of the combination of two MC_MoveVelocity function blocks:

  1. The left part of the timing diagram illustrates the case if the Second Function block (FB) is called after the First one is completed. If First reaches the commanded velocity 3000 then the output First.InVelocity AND the signal Next causes the Second FB to move to the velocity 2000. In the next cycle First.InVelocity is FALSE and First.CommandAborted is TRUE. Therefore the Execute of the 2nd FB is FALSE. As soon as the axis reaches Velocity 2000, the Second.InVelocity is TRUE.

  2. The right part of the timing diagram illustrates the case if the Second move function block (FB) starts the execution while the First FB is not yet "InVelocity." The following sequence is shown: The First motion is started again by GO at the input "First.Execute." While the First FB is still accelerating to reach the velocity 3000, it is interrupted and aborted because the Test signal starts the Run of the Second FB. Now the Second FB runs and decelerates the velocity to 2000.

NOTE:  The second FB in the mode "mcAborting" (If in the buffered mode the velocity reaches 3000 before starting the next FB).