C program stops when G code finishes

Moderators: TomKerekes, dynomotion

Post Reply
ZooBDoo
Posts: 38
Joined: Tue May 07, 2019 4:35 pm

C program stops when G code finishes

Post by ZooBDoo » Mon Jan 20, 2020 4:05 pm

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
Attachments
CGI Polygon.ngc
(284 Bytes) Downloaded 6 times
HomeBrushlessCGI_0_2j.c
(10.21 KiB) Downloaded 6 times

User avatar
TomKerekes
Posts: 789
Joined: Mon Dec 04, 2017 1:49 am

Re: C program stops when G code finishes

Post by TomKerekes » Mon Jan 20, 2020 5:13 pm

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.
Regards,

Tom Kerekes
Dynomotion, Inc.

ZooBDoo
Posts: 38
Joined: Tue May 07, 2019 4:35 pm

Re: C program stops when G code finishes

Post by ZooBDoo » Tue Jan 21, 2020 12:45 am

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
Attachments
IMG_0603.JPG
IMG_0602.JPG
IMG_0601.JPG
IMG_0600.JPG

User avatar
TomKerekes
Posts: 789
Joined: Mon Dec 04, 2017 1:49 am

Re: C program stops when G code finishes

Post by TomKerekes » Tue Jan 21, 2020 1:12 am

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
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply