MC_MoveRelative
A relative motion is commanded with the MC_MoveRelative FB, in addition to the current position. This is regardless of whether the axis is in "Discrete Motion" or "Continuous Motion" state. The motion is always executed jerk-limited at 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.
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. |
Distance | LREAL | Relative distance for the motion. Value range [-2147483648.0, 2147483647.0] |
Velocity | LREAL | Maximum velocity of the motion. This value must be specified positive. The velocity is not necessarily reached. 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] |
VAR_OUTPUT | ||
Variable name | Data type | Description |
Done | BOOL | The axis is within a range close to the target position. The range is specified by the parameter getriebe[...].window (P-AXIS-00236) of the axis-specific machine data. |
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 for jerk are practical if they correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s. 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 the target position commanded exceeds the position of the software limit switches, the axis starts off nevertheless. If a software limit switch position is reached, the axis is braked, keeping to the defined acceleration.