MC_MoveVelocity_PTO: Control the Speed of the Axis
To see the general representation in IL or ST language, refer to the chapter Function and Function Block Representation.
This table describes the input variables:
Input |
Type |
Initial Value |
Description |
---|---|---|---|
Axis |
AXIS_REF_PTO |
- |
Name of the axis (instance) for which the function block is to be executed. In the devices tree, the name is declared in the controller configuration. |
Execute |
BOOL |
FALSE |
On rising edge, starts the function block execution. On falling edge, resets the outputs of the function block when its execution terminates. Later changes in the function block input parameters do not affect the ongoing command, unless the input ContinuousUpdate is used. If a second rising edge is detected during the execution of the function block, the ongoing execution is aborted and the function block is restarted with the values of the parameters at the time. |
ContinuousUpdate |
BOOL |
FALSE |
At TRUE, makes the function block use the values of the input variables (Velocity, Acceleration, Deceleration, and Direction), and apply it to the ongoing command regardless of their original values. The impact of the input ContinuousUpdate begins when the function block is triggered by a rising edge on the Execute pin, and ends as soon as the function block is no longer Busy or the input ContinuousUpdate is set to FALSE. |
Velocity |
DINT |
0 |
Target velocity in Hz, not necessarily reached. Range: 0...MaxVelocityAppl |
Acceleration |
DINT |
0 |
Acceleration in Hz/ms or in ms (according to configuration). Range (Hz/ms): 1...MaxAccelerationAppl Range (ms): MaxAccelerationAppl...100,000 |
Deceleration |
DINT |
0 |
Deceleration in Hz/ms or in ms (according to configuration). Range (Hz/ms): 1...MaxDecelerationAppl Range (ms): MaxDecelerationAppl...100,000 |
Direction |
MC_DIRECTION |
mcPositiveDirection |
|
BufferMode |
MC_BUFFER_MODE |
mcAborting |
|
JerkRatio1 |
INT |
0 |
Percentage of acceleration from standstill used to create the S-curve profile. |
JerkRatio2 |
INT |
0 |
Percentage of acceleration to constant velocity used to create the S-curve profile. |
JerkRatio3 |
INT |
0 |
Percentage of deceleration from constant velocity used to create the S-curve profile. |
JerkRatio4 |
INT |
0 |
Percentage of deceleration to standstill used to create the S-curve profile. |
This table describes the output variables:
Output |
Type |
Initial Value |
Description |
---|---|---|---|
InVelocity |
BOOL |
FALSE |
If TRUE, indicates that the target velocity is reached. |
Busy |
BOOL |
FALSE |
If TRUE, indicates that the function block execution is in progress. |
Active |
BOOL |
FALSE |
The function block controls the Axis. Only one function block at a time can set Active TRUE for a defined Axis. |
CommandAborted |
BOOL |
FALSE |
Function block execution is finished, by aborting due to another move command or an error detected. |
Error |
BOOL |
FALSE |
If TRUE, indicates that an error was detected. Function block execution is finished. |
ErrorId |
PTO_ERROR |
PTO_ERROR.NoError |
When Error is TRUE: code of the error detected. |
NOTE:
oTo stop the motion, the function block has to be interrupted by another function block issuing a new command.
oIf a motion is ongoing, and the direction is reversed, first the motion is halted with the deceleration of the MC_MoveVelocity_PTO function block, and then the motion resumes backwards.
oThe acceleration/deceleration duration of the segment block must not exceed 80 seconds.
The diagram illustrates a simple profile from Standstill state:
The diagram illustrates a complex profile from Continuous state:
The diagram illustrates a complex profile from Continuous state with change of direction:
The diagram illustrates a complex profile from Discrete state: