Problem with G-code cut speed

I am working with a guy remotely and have come up with a problem he is having I cannot under stand why the second cut and all after that it does not set a cut speed. Attached is a screen shot of what the G-code looks like, and the post processor he is using. I sent this post processor to him so he could use a Ohmic sensor, and I have used if before (not now as I am using LinuxCNC) he is using Mach 3 and is licensed to use both SheetCam and Mach3.
Please help


Mach3 test plasma THC Proma with probe ohnic touch.zip (1.3 KB)

Does the post have modal on the line with the feedrate? Modal makes it only output things if they change.
If you change it to nonmodal it will always output.
Sorry, just noticed the reference move has a feedrate.

@djreiswig is correct in that you’re not getting more feedRate posting because feedRate value is not changing relative to the last use of
post.ModalNumber (" F", feedRate * scale, “0.0###”)

However, the better practice may be to leave ModalNumber() code as is and fix the setup to the problem, which is triggered in OnPenDown() buy posting ‘F10’ like this-
post.ModalText (" G31 Z-50 F10\n")

Rather, do-
post.Text (" G31 Z-50")
post.NonModalNumber (" F", 10, “0.0”) corrected
post.Eol()

ModalNumber() saves the last keyed full value of text that it evaluates to, that is after all variables and formatting has been evaluated, where the key value to the posting text is the first argument of the function call. So in this case " F" is the key for ModalNumber()'s lookup to test if the evaluated text has changed since last use of the same key value. @Les_Newell , please correct if I have this wrong.
Using NonModalNumber() will force the evaluated text to always post AND will update the last saved key and expression, so ModalNumber() will behave as expected if/when used later.

There is also some ‘dead’ gcode posted just prior as-
post.ModalText (“\n G90F30\n”)
Sheetcam is always expecting to operate in G90 (absolute distance) unless the pp changes temporarily to G91 for some segment of gcode it produces, but then it must flip back to G90 before sheetcam is used to post coordinates. I don’t find G91 elsewhere in the pp so no need to ensure it’s in G90 at this point.
As for the ‘F30’, I don’t believe that has any affect on G00 motion speed which is the modal mode in which it is posted, unless Mach3 allows its use.

I did not look at the post, but I guess that explains why the feedrate in the reference didn’t affect the Modal function.
Great explanation on how Modal works.

1 Like

So you are saying I should remove the line
post.ModalText (“\n G90F30\n”)
and change the line
post.ModalText (" G31 Z-50 F10\n")
To
post.Text (" G31 Z-50")
post.NonModalNumber (" F", 10, “0.0”)
what I don’t understand is I generate a G-code on my system with the original post processor I attached I get the speed changes as I should. But on his system the same post processor does not have the speed changes after the first cut operation.
4 washers for grinder.tap (5.3 KB)
Here is a g-code I just generated and it has all the speed changes after the first cut.

Look at lines

n190 first cut speed

n440 second cut

n690 3rn cut

n940 4th cut

1190 5th cut

n1440

n1690

n1940 last cut

re. what to change in pp- you understand it correctly.
Although, rather than remove-
post.ModalText (“\n G90F30\n”)
change it to-
post.Eol()
to terminate the previous line with \n (line feed char)

re. your results always posting feedRate F60 (which appears to be a plungeRate) on the lines you note, also notice your case is also posting F200 on the line after, which is likely the cutting feedRate.
I’m going to guess in the former gcode case for your OP, that the tool defines the cutting feedRate equal to the plungeRate ?

post pro
post tool
Yes those are the plunge and cut speed rates from the tool I selected for that
G-code. the ( post.Eol()) is on the last line in that post processor.
Sorry I am a complete beginner with the language the post processor is written in.
If posable will you post a post processor the guy can download for Mach 3 that uses a Ohmic sensor (G31 Probe) he is remote to me and we have been working on this with email back and forth.

yes, no problem.
in the meantime, I tossed you a private email to call me, we know each other from some past CNC project correspondence, we can catch up.

You be right, ran a test G-code and the speeds need to be different.
I sent an email to the guy explaining where to see the speed settings in the tool setting and check the planning speed set to match for the metal thickness.
He is just learning like all of us, Thanks for the help :smiley: :beers:

1 Like

here is the modified pp as discussed earlier to allow for both cutting feedRate and plungeRate to be equal values. I did see a few more pp and dead gcode lines to consolidate and/or clean up, I hope I didn’t break it. ;), but please let me know if I mistakenly did.

Mach3 test plasma THC Proma with probe ohnic touch.scpost (3.6 KB)
simple square feedrates equal.tap (1.2 KB)
simple square.tap (1.2 KB)
simple test case.dxf.txt (18.5 KB)
simple square.job (7.1 KB)

Thanks for your help I will pass the info on to the other guy. (: (:smile:

1 Like