- Posts: 9
- Thank you received: 0
machine stops in the middle of an NC program
17 years 4 months ago #438
by tedani
machine stops in the middle of an NC program was created 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.
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.
Please Log in to join the conversation.
17 years 4 months ago #439
by tedani
Replied by tedani on topic Re:machine stops in the middle of an NC program
Sorry, the forum doesn't allow me to upload the NC program.:S :S :S
Please Log in to join the conversation.
17 years 4 months ago #443
by alex_joni
Replied by alex_joni on topic Re:machine stops in the middle of an NC program
tedani wrote:
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
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 to join the conversation.
17 years 4 months ago #469
by tedani
Replied by tedani on topic Re:machine stops in the middle of an NC program
alex_joni wrote:
A copy of the NC program is available at :
www.4shared.com/file/113380323/21411a5e/bobo.html
Thank you very much.
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 to join the conversation.
17 years 4 months ago #475
by tedani
Replied by tedani on topic Re:machine stops in the middle of an NC program
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.
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.
Attachment EMC2_log.gz not found
Please Log in to join the conversation.
17 years 3 months ago #485
by tedani
Replied by tedani on topic Re:machine stops in the middle of an NC program
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.
The function" emcTaskPlan" is too long and too many "switch"es, somebody needs to tidy it up.
Please Log in to join the conversation.
17 years 3 months ago #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.
"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.
Attachment emctaskmain.tgz not found
Please Log in to join the conversation.
17 years 3 months ago #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
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Git...gh_e_mail_or_the_web
Thanks for finding that.
John
Please Log in to join the conversation.
17 years 3 months ago #505
by tedani
Replied by tedani on topic Re:Bug fixed!!!!!
BigJohnT wrote:
I didn't know this submission procedure and apologized for the trouble caused.
Could you do it for me?
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.
Please Log in to join the conversation.
Time to create page: 0.098 seconds
