machine stops in the middle of an NC program

More
17 Jun 2009 14:08 - 17 Jun 2009 14:09 #438 by tedani
I'm running version 2.3.1.

My problom is that AXIS stops (not pause) my 51000 lines NC program in the middle (actually at line 1014). When I restart the NC program, the CNC machine doesn't move. But the CNC machine is responsive to homing and jog buttons. I quit AXIS and start again, it stops the NC program in the middle and the same things happen.

It seems like the Gcode interpreter dies while processing an NC program, but I don't find any error message in system log.

To recreate the problem (even without connecting to a CNC machine):
1. create a configuration where X = 0 to 600, Y = 0 to 400, Z = -130 to 0
2. home all axes
3. offset X, Y and Z using the jog button (say: X = 100, Y = 50, Z = -70)
4. click "Touch off", enter the value 0 and coordinate system is "P1 G54".
5. load the attached NC program
6. run the NC program.
7. somewhere down the lines you will see the NC program is stop!!!

Attached is a copy of the NC program in case someone would like to try.

Can anyone tell me if i did anything wrong or it is a problem of EMC2.

Thank you very much for your assistance.
Last edit: 17 Jun 2009 14:09 by tedani.

Please Log in or Create an account to join the conversation.

More
17 Jun 2009 14:12 - 17 Jun 2009 14:14 #439 by tedani
Sorry, the forum doesn't allow me to upload the NC program.:S :S :S
Last edit: 17 Jun 2009 14:14 by tedani.

Please Log in or Create an account to join the conversation.

More
18 Jun 2009 09:19 #443 by alex_joni
tedani wrote:

Sorry, the forum doesn't allow me to upload the NC program.:S :S :S


It depends how large it is. Maybe you can use pastebin.ca or a similar site to upload it.

Alex

PS: if that doesn't work, you can email it to me

Please Log in or Create an account to join the conversation.

More
22 Jun 2009 08:44 #469 by tedani
alex_joni wrote:

tedani wrote:

Sorry, the forum doesn't allow me to upload the NC program.:S :S :S


It depends how large it is. Maybe you can use pastebin.ca or a similar site to upload it.

Alex

PS: if that doesn't work, you can email it to me


A copy of the NC program is available at :
www.4shared.com/file/113380323/21411a5e/bobo.html

Thank you very much.

Please Log in or Create an account to join the conversation.

More
27 Jun 2009 11:22 - 27 Jun 2009 14:16 #475 by tedani
I have found out that AXIS stops the NC program in the middle if it is started from "Execute next line" followed by "Resume execution".

Attached is a copy of the log file, I hope that it contains useful information for you guys to find out the cause of the problem.

Thank you very much.

File Attachment:

File Name: EMC2_log.gz
File Size:46 KB
Attachments:
Last edit: 27 Jun 2009 14:16 by tedani.

Please Log in or Create an account to join the conversation.

More
04 Jul 2009 20:05 #485 by tedani
Having read through the source code, it seems the interpreter ignored the remaining lines after buffer full, I need to add some debugging messages to the program to trace it.

The function" emcTaskPlan" is too long and too many "switch"es, somebody needs to tidy it up.

Please Log in or Create an account to join the conversation.

More
08 Jul 2009 16:58 - 08 Jul 2009 18:24 #495 by tedani
Replied by tedani on topic Bug fixed!!!!!
I have modified emctaskmain.cc to fix the bug. Now, EMC can process the remaining lines after buffer full condition is cleared. This bug only occurs if stepping an NC program from the very beginning.

"emcTaskPlan" is split into several local functions, the "goto" statement is eliminated. The state machine is now easier for human to understand.

For me to read the source code more easier, I reformatted the source using my style. I apologized for the trouble if you didn't like it.

File Attachment:

File Name: emctaskmain.tgz
File Size:19 KB
Attachments:
Last edit: 08 Jul 2009 18:24 by tedani.

Please Log in or Create an account to join the conversation.

More
09 Jul 2009 12:35 #503 by BigJohnT
Replied by BigJohnT on topic Re:Bug fixed!!!!!
To submit a patch follow the instructions on this page.

wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Git...gh_e_mail_or_the_web

Thanks for finding that.

John

Please Log in or Create an account to join the conversation.

More
09 Jul 2009 19:33 #505 by tedani
Replied by tedani on topic Re:Bug fixed!!!!!
BigJohnT wrote:

To submit a patch follow the instructions on this page.

wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Git...gh_e_mail_or_the_web

Thanks for finding that.

John


I didn't know this submission procedure and apologized for the trouble caused.:( Could you do it for me?:unsure:

Please Log in or Create an account to join the conversation.

Time to create page: 0.173 seconds
Powered by Kunena Forum