MC_MoveModulo
This function block commands a motion to a specified modulo position.
Syntax
Definition:
FUNCTION_BLOCK MC_MoveModulo
VAR_IN_OUT
Axis : Reference To AXIS_REF;
END_VAR
VAR_INPUT
Execute : BOOL;
Position : LREAL;
AdditionalTurns : UDINT;
Velocity : LREAL;
Acceleration : LREAL;
Deceleration : LREAL;
Jerk : LREAL;
BufferMode : EBufferMode;
Direction : EModuloDirection;
END_VAR
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
Active : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorId : UDINT;
END_VAR
Inputs
Name | Type | Default | Description |
|---|---|---|---|
Execute | BOOL |
| Trigger the command with rising edge. |
Position | LREAL | #Invalid | Commanded modulo position ([PosUnit]) |
AdditionalTurns | UDINT | 0 | Number of additional modulo turns in the commanded direction. A value > 0 requires Direction <> EModuloDirection.ShortestDistance. |
Velocity | LREAL | #Invalid | Maximum velocity ([PosUnit]/s, positive) |
Acceleration | LREAL | #Default | Maximum acceleration ([PosUnit]/s^2, positive) |
Deceleration | LREAL | #Default | Maximum deceleration ([PosUnit]/s^2, positive) |
Jerk | LREAL | #Default | Maximum jerk ([PosUnit]/s^3, positive) |
BufferMode | EBufferMode | Aborting | Chronological sequence of the command |
Direction | ShortestDistance | Commanded direction. Must have value <> EModuloDirection.ShortestDistance if AdditionalTurns has value > 0. |
Outputs
|
Name |
Type |
Description |
|---|---|---|
|
Done |
BOOL |
Commanded position finally reached |
|
Busy |
BOOL |
Function block is not finished and new output values are to be expected. |
|
Active |
BOOL |
Function block has active control on the axis. |
|
CommandAborted |
BOOL |
Command is aborted by another command. |
|
Error |
BOOL |
Error occurred within function block. |
|
ErrorId |
UDINT |
Error identifier |
Further information
If the Direction input is set to PositiveDirection or NegativeDirection, the AdditionalTurns input is also taken into account. The AdditionalTurns input can be used to specify additional turns until the target position is reached.
Further information on Modulo positioning.
Version information
- TwinCAT Standard >= v3.1.4026.23.1
- TF5500 MC3 Base >= v4.0.6