MC_MoveVelocity
Continuous travel is carried out with the function block MC_MoveVelocity.
VAR_INPUT
VAR_INPUT
Execute : BOOL;
Velocity : LREAL;
Acceleration : LREAL;
Deceleration : LREAL;
Jerk : LREAL;
Direction : MC_Direction;
ND_VAR
Execute : The command is executed with rising edge.
Velocity : Maximum velocity increase during travel (>0).
Acceleration : Acceleration (≥0). If the value is 0, the standard acceleration from the axis configuration in the System Manager is used.
Deceleration : Deceleration (≥0). If the value is 0, the standard deceleration from the axis configuration in the System Manager is used.
Jerk : Jerk (≥0). If the value is 0, the standard jerk from the axis configuration in the System Manager is used.
Direction : Direction for the motion.
VAR_OUTPUT
VAR_OUTPUT
InVelocity : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR
InVelocity : Becomes TRUE once the target velocity is reached.
CommandAborted : Becomes TRUE, if the command could not be fully executed. The reason may be an error, a stop, or a superimposed travel command.
Error: Becomes TRUE, as soon as an error occurs.
ErrorID : Supplies the error number when the Error output is set.
VAR_IN_OUT
VAR_IN_OUT
Axis : NCTOPLC_AXLESTRUCT;
END_VAR
Axis : Axis structure.
Requirements
Development environment | Target system type | PLC libraries to be linked |
---|---|---|
TwinCAT v2.8 | PC (i386) | TcMC.Lib |