Problem G-code?

  • Todd Zuercher
  • Todd Zuercher's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
24 Jul 2025 17:17 #332271 by Todd Zuercher
Problem G-code? was created by Todd Zuercher
I wrote this parametric G-code program and it seems to run fine on my simulation machine.  But when I try to run it on the real machine it stops at line 20  and gives (Does not exicute line 20) no feedback as to why.  However my simulation machine is running Linuxcnc 2.9, and the real  machine is only on 2.7. 

File Attachment:

File Name: dig4surfacetable.ngc
File Size:1 KB
Attachments:

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

More
24 Jul 2025 17:44 #332274 by MaHa
Replied by MaHa on topic Problem G-code?
Line 20 has M0, but normally the next line is the problem, the first G1 move in the routine. Is spindle.0.at-speed true?

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

More
24 Jul 2025 18:13 #332276 by MaHa
Replied by MaHa on topic Problem G-code?
And here is a diff, what could be modified from left to right
 
Attachments:

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

  • Todd Zuercher
  • Todd Zuercher's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
25 Jul 2025 10:49 #332300 by Todd Zuercher
Replied by Todd Zuercher on topic Problem G-code?
It wasn't spindle at speed, I had checked that first thing. It wasn't the M0 pause, I had tried running it with that line deleted with the same result. Starting the program rhe machine would raise the spindles, start the spindles, move to the starting point, lower the spindles down to 0.25, and pause, At this point clicking the pause button or pressing the next line buttons would have no effect. I tried debugging the parameter that was setting the feed rate before Line 20, and it was what it was supposed to be. I tried deleting the parameter for the feed and expicitly setting the F term with the real feed number, no effect. Deleting the M0 only changed that the pause button on the menu bar wouldn't toggle on, but the machine still would not proceed beyond line 20.

I still don't know what the real problem was, but I restarted the Linuxcnc from the command line to try to see if there were any messages there, and then it ran fine. weird

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
25 Jul 2025 11:57 #332302 by tommylight
Replied by tommylight on topic Problem G-code?
Axis GUI?
Did you accidentally press the 0 on the keyboard? That would set the feed rate to 0 and would do exactly as you describe, namely start and go to the first cut and stop there waiting.

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

  • Todd Zuercher
  • Todd Zuercher's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
25 Jul 2025 11:59 #332304 by Todd Zuercher
Replied by Todd Zuercher on topic Problem G-code?
I'm sorry I don't understand what the point of checking to see if #_task> is equal to 0 in my sub program that is intended to end the program.  And maybe that isn't the best way to do that.  I basically have two branches, the surfacing program can end either at the front or back of the machine depending on where it runs out of space.  Then it needs to raise the spindles, turn them off, and end the program.  Maybe it would have been better to end it like this.
(Table Surfacing)
(No Fences Installed While Surfacing !!!)
(Todd Zuercher 07/24/2025)
#1=[60/25.4] (Tool Diameter 60mm)
#2=[#1*0.45] (Starting point)
#3=500 (Surfacing Feed Rate)
#4=50 (Plunge Feed Rate)
#5=35.0 (X extent)
#6=125.0 (Y extent)
#7=0.95 (Step over %/100)
(begin preamble)
G17 G54 G40 G49 G80 G90
G20
G53 G0 Z0 W0
M6T1
M3 S9000
F#4
G0 X#2 Y0
G0 Z0.25 W0.25
M0
G1 Z0.0 W0.0
o100 do
  G1 X#2 F#3
  G1 Y#6
  #2=[#2+#1*#7]
    o110 if [#2 GT #5]
      o100 break
    o110 else
      G1 X#2
      G1 Y0
    o110 endif
  #2=[#2+#1*#7]
o100 while [#2 LT #5]
G53 G0 Z0 W0
M5
M2

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

Time to create page: 0.069 seconds
Powered by Kunena Forum