Jzerb,
in any machine, and I mean any machine!
you have to have manual controls to reset the machine to the home position and clean it out or restart the operation.
what I was talking about was the following and maybe you understood.
if start and not go there
jsr seq 1
jsr seq 2
jsr seq 3
…
jsr seq 7
cycle end
wait for next start instruction.
if start pb and go there
jsr seq 2
jsr seq 3
jsr seq 4
…
cycle end
wait for next start instruction
as I said earlier, you must have manual logic to home the machine AND in the proper order to prevent you from tearing up the machine.
I saw a machine that cost 2.5 million tore to pieces when the company lost power and when power was restored, they hit the home button per the instructions. everything went home all at once and did $250k in damage and took 9 months to rebuild. the programmers were fired by the oem and the oem was not happy having to pay the repair costs and lost revenue bill.
james
so what i have come up with, and it seems to be working thus far is this.
you have setpoints a,b,c,d,e for vertical machine movement.
you have three different buttons on the HMI, for three different sequences.
i have three different step indexes for each sequence. if youre in one sequence you cannot start another and other safety interlocks etc.
operator hits button for sequence 1. sequence 1 starts, goes to setpoints a,b and is then complete.
operator hits button 2 for sequence 2. sequence 2 starts, goes to setpoint b and is then complete.
operator hits button 3 for sequence 3. sequence 3 starts, goes to setpoints c,d,b,a and is then complete.
i figured overall the easiest way, for my programming skill level, was to do it that way. I have seen it done with the JSR breakup as you mentioned, i even have an older piece of code from a machine done years ago that was programmed by an outside vendor that uses that method, and as much as i liked it i couldnt seem to follow it as easily. Then again, i guess its always easier to follow your own written code.
if there is an issue within any sequence, someone with super user access to the HMI has to log in, reset the step index for the cycle then hit a home button to bring machine to a known position before attempting to start any other sequence.