1.2104 CYCLE STOP not handled correctly in sub loop

If you think you've found a bug post it here.

1.2104 CYCLE STOP not handled correctly in sub loop

Postby dammogreen » Mon Apr 16, 2018 2:56 am

I have program that loops through a subroutine , say 3 times.

If, on the first loop I hit the CYCLE STOP button at a "Point X" in the subroutine....(and restart with CYCLE START)

Then when loop 1 is completed, after M99, it SHOULD go back to the start of the Subroutine for Loop#2 but it does NOT....

....it incorrectly picks up (re-starts) the code from "Point X" where CYCLE START was pushed in the PREVIOUS loop....very dangerous.


also happened with 1.2103
dammogreen
 
Posts: 40
Joined: Thu Jan 11, 2018 10:24 pm

Re: 1.2104 CYCLE STOP not handled correctly in sub loop

Postby Vmax549 » Mon Apr 16, 2018 2:41 pm

In testing this I find part of what you see. When you {cyclestop} in a sub and then restart you do get a message telling you that there is an empty sub stack and it will abort teh program BUT at teh same time it restarts teh sub running from where you stopped it. IF it cancel teh sub then it should NOT continue running it. It does run to teh completion of teh current loop then stops. IF you try to restart again you get a Sub stack empty message and then it really does cancel teh sub call.

So yes it IS broken.

(;-) TP
Vmax549
 
Posts: 1043
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: 1.2104 CYCLE STOP not handled correctly in sub loop

Postby dammogreen » Mon Apr 16, 2018 4:48 pm

Vmax:......"IF it cancel teh sub then it should NOT continue running it."

Can you elaborate how,what you mean by canceling the sub? Do you man CYCLE STOP button would be considered a cancellation of a sub, even if one hits CYCLE START directly after the CYCLE STOP button?

So are you saying, if you cycle stop the program within a sub...to jog and check something it SHOULD stop /break the loop?
I am expecting CYcle start to continue at the next line of code after the CYCLE STOP was hit, weather it is in the main body of the program OR within in a sub routine....is my assumption incorrect?

If so ,that would mean there is no way for the user to stop and jog within a loop without breaking the loop...?
One could then only use FEED HOLD to "pause" if one wishes to be able to continue the loop in the correct sequence. without breaking it?


ALso, I don't get a message telling you that there is an empty sub stack, like you are seeing.
dammogreen
 
Posts: 40
Joined: Thu Jan 11, 2018 10:24 pm

Re: 1.2104 CYCLE STOP not handled correctly in sub loop

Postby Vmax549 » Mon Apr 16, 2018 5:57 pm

Some controls allow you to stop/restart inside of a sub and some don't. I do not know for sure How UCCNC handles a sub in that situtuation. I probably tested it long ago and will have to go back threw some notes to find out for sure.

UCCNC does not officially have a stop/jog/return routine. I have created such and it is tested with canned cycles but I do not remember IF subs were included. BUT as of now that part appears broken.

AND I agree that IF it cancels it it should cancel it not continue on after a Stop / Restart situation.

(;-) TP
Attachments
Substack_error.jpg
Vmax549
 
Posts: 1043
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: 1.2104 CYCLE STOP not handled correctly in sub loop

Postby dammogreen » Mon Apr 16, 2018 6:03 pm

Thanks for the help!

I am using a bar feeder to feed stock into my 4th axis and I set the loop count to the number of parts that the stock can supply.

So in a long run of parts I may want to PAUSE and jog the machine within a certain loop for set up purposes.
Just like one can when not inside a loop.

It would be best if the run could be continued in sequence after a pause (CYCLE STOP), rather than loop break.
So I am hoping that is how UCCNC will handle it...after it is fixed,anyway.
dammogreen
 
Posts: 40
Joined: Thu Jan 11, 2018 10:24 pm

Re: 1.2104 CYCLE STOP not handled correctly in sub loop

Postby Vmax549 » Mon Apr 16, 2018 6:20 pm

I went back and tested a SUB with a Run From Here inside of the loop and it reacted exactly the same way as we have seen with Stop_Jog_Restart.

Based on the messagebox message I would assume that they intended it to break the loop and stop .

But that is something that Balazs will have to verify to be absolutely sure.

(;-) TP
Vmax549
 
Posts: 1043
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: 1.2104 CYCLE STOP not handled correctly in sub loop

Postby dammogreen » Mon Apr 16, 2018 6:27 pm

By the way , you are using the sample code that i posted in my OTHER post "M1" handling topic to test this, CYCLE stop problem
....it may not matter, but I don't get that "No return address" message,when running other programs that do cause the problem THIS thread is addressing.
dammogreen
 
Posts: 40
Joined: Thu Jan 11, 2018 10:24 pm

Re: 1.2104 CYCLE STOP not handled correctly in sub loop

Postby Vmax549 » Mon Apr 16, 2018 7:05 pm

Yes I used your Gcode program to test. AND I used another Gcode program I wrote as well. Same results.

(;-) TP
Vmax549
 
Posts: 1043
Joined: Sun Nov 22, 2015 3:25 am
Location: USA


Return to Report a bug

Who is online

Users browsing this forum: No registered users and 3 guests