MC_MoveAbsolute
The MC_MoveAbsolute function block commands the axis to a specified absolute position.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | Axis | AXIS_REF | Logical axis reference. This value can be located on the Configuration tab in the Hardware Configuration (logical axis number). | |
| VAR_INPUT |
|
|||
| B | Execute | BOOL | Upon the rising edge of the Execute input, all other inputs are read and the function block becomes operational. If an input needs to be modified, the value will have to be changed and the Execute input will have to be re-triggered. | FALSE |
| B | Position | LREAL | A positive or negative value within the coordinate system in user units. | LREAL#0.0 |
| E | Velocity | LREAL | Absolute value of the velocity in user units/second. | LREAL#0.0 |
| E | Acceleration | LREAL | Value of the acceleration in user units/second^2 (acceleration is applicable with same sign of torque and velocity) | LREAL#0.0 |
| E | Deceleration | LREAL | Value of the deceleration in user units/second^2 (deceleration is applicable with opposite signs of torque and velocity.) | LREAL#0.0 |
| E | Jerk | LREAL | Not supported; reserved for future use. Value of the jerk in [user units / second^3]. | LREAL#0.0 |
| E | Direction | MC_Direction | Specifies the direction of motion. Allowable modes are positive_direction, shortest_way, negative_direction, current_direction. MC_Direction#Positive_Direction MC_Direction#Shortest_Way MC_Direction#Negative_Direction MC_Direction#Current_Direction |
MC_Direction#Positive_Direction |
| E | BufferMode | MC_BufferMode | Defines the behavior of the axis - allowable modes are Aborting, Buffered, BlendingLow, BlendingPrevious, BlendingNext, and BlendingHigh. MC_BufferMode#Aborting MC_BufferMode#Buffered MC_BufferMode#BlendingLow MC_BufferMode#BlendingPrevious MC_BufferMode#BlendingNext MC_BufferMode#BlendingHigh |
MC_BufferMode#Aborting |
| VAR_OUTPUT | ||||
| B | Done | BOOL | The Done output is set to TRUE when the commanded action has completed successfully. If another function block takes control before the action is completed, the Done output will never become TRUE. This output is reset when Execute becomes FALSE. | |
| B | Busy | BOOL | For function blocks with Execute input, the Busy output is set to TRUE upon the rising edge of the Execute, and set to FALSE when Done, CommandAborted or Error outputs becomes TRUE. In the case of a function block with an Enable input, Busy indicates that the function block is operating, but may not be ready to provide valid outputs. | |
| B | Active | BOOL | The Active output is set to TRUE when the function block takes control of an operation. When commands are buffered, and a queue is generated, only one function block can be active at a time. For non buffered commands, Active and Busy could be the same. | |
| B | CommandAborted | BOOL | The CommandAborted output is set to TRUE if the operation performed by the instance of the function block is aborted by another command. | |
| B | Error | BOOL | The Error output is set to TRUE if an error has occurred during the operation of the function block. The output is cleared when the Execute or Enable input becomes FALSE. | |
| B | ErrorID | UINT | The ErrorID output provides the identifier of the error when there is an active error in the function block execution. The output is cleared when the Execute or Enable input becomes FALSE. | |
Notes
- The absolute position, as with all other inputs, can be updated while in motion by retriggering the Execute input.
- This action completes with velocity zero if no further blocks are pending.
- Regarding the use of the 'Direction' input:
- The value of 'Direction' is ignored when the axis 'Load Type' is configured as 'Linear' (finite), becausethere is only one mathematical solution to reach the commanded position.
- 'Position' will be modulated within the range of 'Machine cycle min' and 'Machine cycle max' when the axis 'Load Type' is configured as 'Rotary' (infinite).
- It is possible to specify a relative move of more than one machine cycle using MC_MoveRelative.
-
MC_Direction#Shortest_Way means the direction is decided by the controller using the shortest path between 'Position' input and commanded position when the block becomes active.
- When the axis 'Load Type' is configured as 'Rotary' (infinite), t he position will be modulated within the range of 'Machine cycle min' and 'Machine cycle max'
- MC_ReadActualPosition
- ActualPosition (Axis Parameter 1000)
- ActualPositionCyclic (Axis Parameter 1005)
- CommandedPositionCyclic (Axis Parameter 1015)
- For further information about the Done output, Profile Complete, and Motion Complete, see the Determining When Motion is Complete section.
Error Description
See the
Function Block ErrorID List
Example
In this example, two MC_MoveAbsolute Function Blocks will be executed consecutively. Starting at a position of 0.0, the first move will go to a position of 20.0 with a velocity of 50.0. The second move will go to a position of 50.0 with a velocity of 20.0.
The Logic Analyzer trace for the above program is shown below:
Timing Diagram