machine stops in the middle of an NC program
- tedani
- Offline
- New Member
- Posts: 11
- Thank you received: 0
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 or Create an account to join the conversation.
- tedani
- Offline
- New Member
- Posts: 11
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- alex_joni
- Offline
- Administrator
Sorry, the forum doesn't allow me to upload the NC program.
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.
- tedani
- Offline
- New Member
- Posts: 11
- Thank you received: 0
tedani wrote:
Sorry, the forum doesn't allow me to upload the NC program.
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.
- tedani
- Offline
- New Member
- Posts: 11
- Thank you received: 0
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.
Please Log in or Create an account to join the conversation.
- tedani
- Offline
- New Member
- Posts: 11
- Thank you received: 0
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.
- tedani
- Offline
- New Member
- Posts: 11
- Thank you received: 0
"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.
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
- Posts: 7106
- Thank you received: 1177
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.
- tedani
- Offline
- New Member
- Posts: 11
- Thank you received: 0
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?
Please Log in or Create an account to join the conversation.