MC_MoveAbsolute
Movement of the axis to an absolute position is commanded with the FB MC_MoveAbsolute FB. The motion is always executed jerk-limited with the constant set input ‘Jerk’. This value is valid for both ‘acceleration’ and ‘deceleration’.
Block diagram
Parameters of the FB
VAR_IN_OUT | |||
| Axis | AXIS_REF | Axis reference. |
VAR_INPUT | |||
| Execute | BOOL | Start the motion at rising edge. |
| Position | LREAL | Target position for the motion. Range [-2147483648.0, 2147483647.0] |
| Velocity | LREAL | Value of the maximum velocity (always positive, not necessarily reached). 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 decceleration (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 2 shortest way 3 negative direction 4 current direction Note: Specifying the direction is effective only if a modulo coordinate system has been defined for the axis in the axis-specific machine data, using parameter kenngr.achs_mode. |
VAR_OUTPUT | |||
| Done | BOOL | The axis is within a range close to the target position. The range is specified by the parameter getriebe[...].window of the axis-specific machine data. |
| 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 the motion controller issues a warning 60211 or 60188 to 60194.
- 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 an axis not referenced is commended by this FB, the axis does not start to move. The error code 60142 is reported on the ‘MC_ReadAxisError’ function block.
- 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 the target position exceeds the position of the software limit switches because of commanding, the axis nevertheless starts off. If a software limit switch position is reached, the axis is braked, keeping to the defined acceleration.