MC_MoveVelocity
With the MC_MoveVelocity FB, you command an endless motion at the specified speed. The motion is always executed jerk-limited with the constant set input ‘jerk’. This value is valid for both ‘acceleration’ and ‘deceleration’.
To stop the motion, the FB must be interrupted by another FB that sends a new command to the axis.
The ‘in_velocity’ output is reset when a falling edge is detected at the ‘Execute’ input or when the effect of the FB is ended due to commanding of another FB.
In conjunction with an MC_MoveSuperImposed FB, the ‘in_velocity’ remains TRUE.
Block diagram
Parameters of the FB
VAR_IN_OUT | |||
| Axis | AXIS_REF | Axis reference. |
VAR_INPUT | |||
| Execute | BOOL | Start the motion at rising edge. |
| Velocity | LREAL | Value of the maximum velocity (always positive). Range [1.0, 2147483647.0] |
| Acceleration | LREAL | Value of the acceleration (always positive, increasing energy of the motor). range [1.0, 2147483647.0] |
| Deceleration | LREAL | Value of the deceleration (always positive, decreasing energy of the motor). Range [1.0, 2147483647.0] |
| Jerk | LREAL | Value of the Jerk (always positive). Range [1.0, 2147483647.0] |
| Direction | INT | Direction in which the movement is started: 1 positive direction 3 negative direction 4 current direction |
VAR_OUTPUT | |||
| InVelocity | BOOL | Commanded velocity reached (first time reached). |
| CommandAborted | BOOL | Command is aborted by another command. |
| Error | BOOL | Indicates if an error has occurred. |
| ErrorID | WORD | Error identification. |
Behavior of the FB
- This motion is commanded only when the axis is in the ‘Standstill’ or ‘Continuous Motion’ or ‘Discrete Motion’ or ‘Synchronized Motion’ state. If this is not the case, the ‘Error’ output is set to FALSE and ‘ErrorID’ indicates an error value that designates the state the axis is currently in.
- Within the FB, the ‘position’, ‘velocity’, ‘acceleration’, ‘deceleration’ and ‘jerk’ input variables are monitored only for their value range. If they are exceeded, an error number referring to the variable is output at the ‘ErrorID’ output and ‘Error’ is set to TRUE. Moreover, the maximum speed and acceleration data is limited within the motion controller. If speed values more than getriebe[0].dynamik.vb_max or ‘acceleration’ or ‘deceleration’ values more than getriebe[0].dynamik.a_max are commanded, the motion is nevertheless carried out, but the values are limited to the defined values and a warning 60211 or 60188 to 60194 is issued.
- Values that correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s make sense as the ‘jerk’. The limit transition to non-jerk-limited speed realization lies at the minimum ramp time of TA. In the case of a value of 0, the maximum ramp time from the axis MDS is used to determine the ‘jerk’.
- With this function block, active commands can be replaced with new commands and so the function block is retriggerable. The active command is thus aborted.
- If a non-referenced axis is commanded by this FB, the axis travels at the speed defined by the getriebe[...].vb_reflow parameter of the axis machine data.
- The positions of the software limit switches (kenngr.swe_pos, kenngr.swe_neg, kenngr.swe_toleranz) are monitored if the axis has been defined either as a linear or a rotary axis. This means that the kenngr.achs_typ of the axis machine data has the value 0x0001 or 0x0002. If a software limit switch position is reached, the axis is braked, keeping to the defined acceleration.
- The acknowledgement at the ‘in_velocity’ output depends on the setting of the kenngr.vb_prozent value [unit 0.1 %]. This value defines a percentage tolerance window for the target speed. The ‘in_velocity’ acknowledgement appears as soon as you enter the tolerance window.