I'm stuck with a quite curios problem and I was not able to find a solution for it yet.
Suppose the main program is executing a motion command (JMOVE or LMOVE for example), and the E-Stop is triggered. This last motion is resumed when the emergency is cleared and the motor power (and cycle) are turned on.
You have a short memory my friend.
This is precisely what myself and dm.bogachev were eluding to in your previous thread regarding this 'automated' emergency stop continuance(s).
This is not a curious problem, this is exactly what happens.
That is why It is not a recommended practice to implement.
On an external immediate interruption many conditions should be considered before continuing.
The 2 minimum conditions as a priority to be considered are (IMHO):
1. The robot may continue to execute the current motion segment.
2. The robot may have processed the next motion segment and execute that new motion segment.
The fail safe method is to:
- Switch to Teach mode.
- Use Check/Go.
- Complete current motion segment step or change step and complete the next motion segment.
- Switch to Repeat and then motor power, cycle start from there.
From a programmatical perspective, the only true method is to :
- Grab current program.
- Grab current step in execution.
- Grab current position.
- Grab other variables or signal states that are relevant that require dealing with.
- Clear the current program stack.
- Check and confirm the current position is the same position it was at at the time of interruption.
- Set/reset whatever variables or signals were at the time of the external interruption.
- Re-prime the program to the motion segment step or non motion step it was executing.
I would read explicitly what the BREAK command does as I don't think you've quite got it.
BREAK has no skip functionality at all.
You may wish to also look into the following commands: