MC_MoveRelative
This function block commands a motion of a specified distance relative to the set position at the time the command gets active.
Syntax
Definition:
FUNCTION_BLOCK MC_MoveRelative
VAR_IN_OUT
Axis : Reference To AXIS_REF;
END_VAR
VAR_INPUT
Execute : BOOL;
Distance : LREAL;
Velocity : LREAL;
Acceleration : LREAL;
Deceleration : LREAL;
Jerk : LREAL;
BufferMode : EBufferMode;
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. |
|
Distance |
LREAL |
#Invalid |
Relative distance ([PosUnit]) |
|
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 |
Outputs
|
Name |
Type |
Description |
|---|---|---|
|
Done |
BOOL |
Commanded distance 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 |