PTOMoveRelative Function Block
The function block commands a move of a distance relative to the current position.
The move profile depends on the specified velocity, deceleration, and acceleration values.
To see the general representation in IL or ST language, refer to the chapter Function and Function Block Representation.
The table describes the input variables:
Inputs |
Type |
Comment |
---|---|---|
PTO_REF_IN |
Reference to the PTO channel. To be connected to the PTO_REF of the PTOSimple or the PTO_REF_OUT output pins of other PTO function blocks. |
|
Execute |
BOOL |
On rising edge, starts the function block execution. Output status pins continue to output the current status while the Move is happening, whether or not the Execute pin is true or not. |
Velocity |
DWORD |
Target/Desired Velocity in Hz (not necessarily reached.) Range: 1...Maximum frequency of the output NOTE: oWhen Velocity is set to 0, and the function block is executed, an error will be returned (PTO_INVALID_PARAMETER). oIf the Velocity is less than the configured non-zero Start Frequency or Stop Frequency, an error will be returned (PTO_INVALID_PARAMETER). oIf the Start Frequency or Stop Frequency is configured as zero, and the Velocity is set to ≤ the calculated Start/Stop Frequency, there will be no acceleration or deceleration phase. The output frequency will simply be that of the Velocity. |
Distance |
DWORD |
Distance of the move in number of pulses. Range: 1...4294967295 NOTE: If the Distance is 1, 2 or 3 pulses, the pulses will simply be output at the configured Stop Frequency. |
Acceleration |
DWORD |
Acceleration in Hz/ms or in ms (according to configuration). Range Hz/ms: 1...Acc. max. Range ms: Acc. max....49999 |
Deceleration |
DWORD |
Deceleration in Hz/ms or in ms (according to configuration). Range Hz/ms: 1...Dec. max. Range ms: Dec. max....49999 |
Direction |
Direction of the move (forward or backward). |
The table describes the output variables:
Outputs |
Type |
Comment |
---|---|---|
PTO_REF_OUT |
Reference to the PTO channel. To be connected with the PTO_REF_IN input pins of other PTO function blocks. |
|
Done |
BOOL |
TRUE = indicates that the command is finished. Function block execution is finished. |
Busy |
BOOL |
TRUE = indicates that the command is in progress. |
Active |
BOOL |
This output is set at the moment the function block takes control of the motion of the axis. |
CommandAborted |
BOOL |
TRUE = indicates that the command was aborted due to another move command. Function block execution is finished. |
Error |
BOOL |
TRUE = indicates that an error was detected. Function block execution is finished. NOTE: Errors must be reset before a new motion command is executed. Otherwise any new motion commands will be ignored. |
ErrID |
When Error is TRUE: type of the detected error. |
NOTE: For more information about Done, Busy, CommandAborted and Execution pins, refer to General Information on Function Block Management.