The PTO channel can respond to a new command while executing (and before completing) the current command according to the following table.
If a new move command is initiated before completion of an on-going command, it will be either accepted (Accept) or rejected (Reject).
Depending on the Mode pin value of the new (next) command, there are two different “Accept” possibilities:
Immediate Accept The new command is accepted immediately and the current command is aborted. The CommandAborted output pin is set on the function block which initiated the current command.
Delay accept The new command is accepted and placed in a buffer. When the current command has finished execution (Done = 1), the new (next) command is executed.
If a new command is rejected (Reject), it is discarded, the current command is aborted, and a PTO error is reported.
|
Current Command |
|||||
---|---|---|---|---|---|---|
PTOMoveVelocity |
PTOMoveRelative |
PTOMoveAbsolute |
PTOEnhancedHome(2) |
Others(1) |
||
Next Command |
PTOMoveAbsolute (abort) |
Immediate Accept |
Immediate Accept |
Immediate Accept |
Immediate Accept |
Reject |
PTOMoveAbsolute (buffer) |
Reject |
Delay Accept |
Delay Accept |
Reject |
Reject |
|
PTOMoveRelative (abort) |
Immediate Accept |
Immediate Accept |
Immediate Accept |
Immediate Accept |
Reject |
|
PTOMoveRelative (buffer) |
Reject |
Delay Accept |
Delay Accept |
Reject |
Reject |
|
PTOMoveVelocity (abort) |
Immediate Accept |
Immediate Accept |
Immediate Accept |
Immediate Accept |
Reject |
|
PTOMoveVelocity (buffer) |
Reject |
Delay Accept |
Delay Accept |
Reject |
Reject |
|
PTOStop |
Immediate Accept |
Immediate Accept |
Immediate Accept |
Immediate Accept |
Reject |
|
Others(1) |
Reject |
Reject |
Reject |
Reject |
Reject |
(1) PTOMoveFast, PTOStop, PTOHome
(2) Only while compensation pulses are being output (value of output variable Status is 2) ; otherwise, the command is rejected.
NOTE: If the current command is aborted and the new (next) command is accepted, there will be a slight delay before the new (next) command starts. This delay will generate additional PTO pulses that may affect the precision of the new (next) move command. These additional pulses can only be determined empirically because their number depends on the application (move velocity, task size, task type, and any other tasks that may intervene). Therefore, you will need to test your application thoroughly to determine the number of additional pulses that occur when one move is interrupted by another, and then to take into account this discrepancy within your application.
|
UNINTENDED EQUIPMENT OPERATION |
oThoroughly test your application to determine the number of extra pulses that are generated when one move instruction is interrupted by another move instruction. oTake into account the number of extra pulses that are generated when one move instruction is interrupted by another move instruction within your application. |
Failure to follow these instructions can result in death, serious injury, or equipment damage. |
NOTE:
oThere will be a PTO_REVERSE_DIRECTION error report if the motion direction is changed during an ongoing move.
oThe execution of PTOEnhancedHome will clear any buffer command.
If a command is rejected (Reject), it indicates that the sequence of commands is not supported, and the following events will occur:
Current command: The current command is aborted. If the command was not completed yet, the CommandAborted output pin is set on the function block.
Next command: The new command is rejected. Error output pin is set on the function block.
Motion state: The motion goes into the ErrorStop state.
The move is stopped with the deceleration set in Dec. Fast Stop configuration parameter.
A detected error is reported on the PTOSimple function block(the PTOError output pin is set on the function block).
Bit 25 (Command rejected) is set in PTO diagnostic. To read PTO diagnostic, use the PTOGetDiag funciton block.
Acknowledge the detected error (using the ResetError input pin of the PTOSimple function block) before a new command.