Page 1 of 1

C program stops when G code finishes

Posted: Mon Jan 20, 2020 4:05 pm
by ZooBDoo
Hello,
I have a "run forever" C program that starts and runs continuously as long as I don't run a G code program. The C program still runs as long as the G code is running or if I stop the G code with the Cycle Stop button. The C program stops running when the G code finishes running. The portion of the C program I'm concerned with is the part that is flashing the output. How do I get this loop to continue forever?

See attached.

Thank you.

AZ

Re: C program stops when G code finishes

Posted: Mon Jan 20, 2020 5:13 pm
by TomKerekes
Hi AZ,

What Thread is the C Program Configured to run in? It should normally be Thread #1 as it is the only Thread not stopped on EStop.

Do you have any other Action configured to run in that Thread? Running a C Program in a Thread will kill any program currently running in that Thread.

Please post your Tool Setup Screens.

Re: C program stops when G code finishes

Posted: Tue Jan 21, 2020 12:45 am
by ZooBDoo
See attached photos. The C program is running in thread #3. I see where there are other C programs called by Mcodes and user buttons calling that same thread (#3) but I'm not activating those. I'm just running the G code program until it stops. Is there still some interference there?

AZ

Re: C program stops when G code finishes

Posted: Tue Jan 21, 2020 1:12 am
by TomKerekes
Hi AZ,

M2 causes the Program Stop and automatically turns off the Spindle by calling the M5 Action which you have set to use Thread #3.

HTH