MC_MoveVelocity
The MC_MoveVelocity FB commands 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".
If the optional parameters “Acceleration, “Deceleration” and “Jerk” are not specified or set to <= 0, the dynamic values are taken from the corresponding axis list.
To stop the motion, the FB must be interrupted by another FB that sends a new command to the axis.
The “InVelocity” output is reset when a falling edge is detected at the “Execute” input or when the effect of the FB is ended due to the command of another FB.
In conjunction with an MC_MoveSuperImposed FB, the “InVelocity” output remains TRUE.
Block diagram
FB parameters
VAR_IN_OUT | ||
Variable name | Data type | Description |
Axis | AXIS_REF | Axis reference |
VAR_INPUT | ||
Variable name | Data type | Description |
Execute | BOOL | The motion starts at the rising edge of this input signal. |
Velocity | LREAL | Velocity value of endless motion. This value must be specified positive. Value range [1. 0, 2147483647.0] |
Acceleration | LREAL | Acceleration value. This value must be specified positive. Value range [0. 0, 2147483647.0] |
Deceleration | LREAL | Deceleration value. This value must be always be specified positive. Value range [0. 0, 2147483647.0] |
Jerk | LREAL | Jerk value. This value must be always be specified positive. Value range [0. 0, 2147483647.0] |
Direction | INT | Direction in which the motion is started. One of the 3 values: Positive direction 3 negative direction 4 current direction |
VAR_OUTPUT | ||
Variable name | Data type | Description |
InVelocity | BOOL | The commanded velocity was reached (for the first time). |
CommandAborted | BOOL | TRUE indicates that the command was aborted by another command. |
Error | BOOL | Is TRUE if an error occurs in the FB. |
ErrorID | WORD | Error identifier |
Behaviour of the FB:
- This motion is commanded only when the axis is in the “Standstill” or “Continuous Motion” or “Discrete Motion” or “Synchronised 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.
- The “Position, “Velocity, “Acceleration”, “Deceleration” and “Jerk” input variables are monitored only for their value range in the FB. If the values are exceeded, an error number referring to the variable is output at the “ErrorID” output and “Error” is set to TRUE. Moreover, the maximum velocity and acceleration data is limited within the motion controller. If speed values greater than getriebe[0].dynamik.vb_max (P-AXIS-00212) or acceleration or deceleration values greater than getriebe[0].dynamik.a_max (P-AXIS-00008) are commanded, the motion takes place nevertheless. The values are limited to the parameterised values and a warning P-ERR-60211 or P-ERR-60188 to P-ERR-60194 is output.
- 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 are practical for jerk. The limit transition to non-jerk-limited velocity control lies at the minimum ramp time of TA. With a value of 0, the maximum ramp time from the axis MDS is used to determine the jerk.
- This function block replaces active commands with new commands, making the function block retriggerable. The active command is then aborted.
- If a non-referenced axis is commanded by this FB, the axis travels at the speed defined by the getriebe[...].vb_reflow parameter (P-AXIS-00218) of the axis machine data.
- The positions of the software limit switches (kenngr.swe_pos (P-AXIS-00178), kenngr.swe_neg (P-AXIS-00177), kenngr.swe_toleranz (P-AXIS-00179)) are monitored if the axis was defined either as a linear or a rotary axis. This means that the kenngr.achs_typ parameter of the axis machine data (P-AXIS-00018) 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 "InVelocity" output depends on the setting of the kenngr.vb_prozent (P-AXIS-00217) value. This value defines a percentage tolerance window for the target velocity. The "InVelocity" acknowledgement appears as soon as you enter the tolerance window.