Absolute Positioning with MC_MoveAbsolute
MC_MoveAbsolute is used to move an axis to an absolute position. This function block will move the axis into DiscreteMotion state. The axis must have performed a home with MC_Home or LS_Home before doing absolute positioning.
-
LS_Connect, MC_Power, and Homing must be executed before this function block can be used.
-
The examples in this topic can be found in the XMC_SingleAxis_FBs.zip downloadable from Example Applications.

Element Name | Element Type | Description |
---|---|---|
Execute | Input | Edge detected request to execute the function block. |
Axis | Input/Output | Axis reference variable. This can not be a constant. |
ContinuousUpdate | Input | Specify the update setting of the input value. This is explained in section 6.1.5 of the XMC user manual. |
Position | Input | Specify the absolute target position. |
Velocity | Input | Specify the maximum speed of the move. |
Acceleration | Input | Specify the acceleration of the move. |
Deceleration | Input | Specify the deceleration of the move. |
Jerk | Input | Specify the change rate of acceleration and deceleration. |
Direction | Input |
Specify the direction of the move.
|
BufferMode | Input | Specify the sequential operation setting. See the BufferMode table below. |
Done | Output | Indicates the function block completed successfully. |
Busy | Output | Indicates the function block is currently being executed. |
Active | Output | Indicates the function block is controlling the axis. |
CommandAborted | Output | Indicates the function block was aborted. |
Error | Output | Indicates whether an error occurs or not. |
ErrorID | Output | Error Identification number. |
BufferMode Table
Sections 6.1.4 and 8.2.10 of the XMC user manual provide more information about buffer modes.
Value | Buffer Mode | Description |
---|---|---|
0 | Aborting | Abort previous command and execute the command immediately. |
1 | Buffered | Execute the command after previous command is completed. |
2 | BlendingLow | The new command is blended into a previously executed command using the lower velocity value when comparing the previous command and new command. |
3 | BlendingPrevious | The new command is blended into a previous command using the velocity of the previous command. |
4 | BlendingNext | The new command is blended into a previous command using the velocity from the new command. |
5 | BlendingHigh | The new command is blended into a previous command using the higher velocity value when comparing the previous command and new command. |

//Set axis reference
Axis1 := 1;
IF (_AX01_RDY) AND (_AX01_SV_ON) AND (_AX01_HOME_CMPL) THEN
//Example of MC_MoveAbsolute
INST_MOVEABSOLUTE(Execute:=Execute_MoveAbsolute, Axis:=Axis1,
ContinuousUpdate:=0, Position:=INST_MOVEABSOLUTE.Position, Velocity:=INST_MOVEABSOLUTE.Velocity,
Acceleration:=INST_MOVEABSOLUTE.Acceleration,
Deceleration:=INST_MOVEABSOLUTE.Deceleration,
Jerk:=INST_MOVEABSOLUTE.Jerk, Direction:=INST_MOVEABSOLUTE.Direction, BufferMode:=0, ErrorID=>INST_MOVEABSOLUTE.ErrorID);
END_IF;
LM509