which postprocessor for mach3 controlled machines

I’m starting to move my development to free software (I’m still using an old VariCAD licence for modelling) and as I’m about to start using a mach3 controlled CNC Mill (owned by a friend), I’d like to spare me the pain to need a windows machine (or an VM or wine) to get the most common estlcam running as my CAM tool.
I have the simple CAM generating stuff learned for a first try. Only thing missing so far is the post processor.
Is there one for the mach3 controllers in existence (I would guess so, beeing a common thing)
And which one would it be?

I’m pretty sure the linuxcnc post would produce code compatible with Mach.

Dan

Thanks for the hint.
Could someone confirm this, just that “pretty sure” don’t end up in some expensive accidents at the CNC mill :wink:

Been using it to control Mach3 for about a year now.

Even following Josh’s confirmation I would always make a test with a vertical offset and low feed rates to verify, before running generated GCode for the very first time.

Thanks fro all the hints and confirmation.
So I will give that a run the next weeks.
My plan was as follows anyways:
I have a project, where we already milled parts on the machine (some sort of macro plywood, 3 90° layers, 19mm in thickness). Since it is pine we know you can cut through the 19mm in one go (8mm tool, 14000 rotation speed, 3000mm/min horizontal speed, 1000mm/min vertical speed).

So my first run will be 1mm stepdown, with some 300/100mm/min speed with a small testpart.

BTW: the machine has a nice vacuum table for this kind of work. you place 3mm MDF on the table, put you piece of wood on it an cut 0.5mm deeper than the workpiece. So the MDF is to be sacrificed, but last for about 5-10 cuttings.no need for holding taps.

Well, sorry to present my first outcome of the test.
fisrt_try.jpg
There was some problem with the z-axe, which made the machine to go down in -z at full speed to be stoped by the emergency shut off, which was triggered by to much force on the spindel. the tool was placed completly inside the stock material by then.
I guess, I need another postprocessor…
(results of comparing working an my gcode are to follow later)

The postprocessor does not control the commanded motions, it only translates the design information into machine-usable code.

The problem needs to be corrected at the design level, which is the FreeCAD model and Path workbench. It is most likely that the setup for starting position, feed rates, depths, etc. is not correct.

No postprocessor is likely to fix any of those things.

You were advised to carefully precheck the path by simulation or by “air cutting”. You really need to do something along that line.

Gene

I have never heard this term before, but it describes very well what has to be done. And before you start, move the milling head as high as possible so you have enough time to stop the machine, if it descends too fast.

I am sure you already know this, but it took me ages to find out. In order to get circles cut correctly I needed to add
G90.1 G91.1
in the PREAMBLE section. These commands are not in the LinuxCNC files

For good reason. :unamused:

Those commands are mutually exclusive. G90.1 calls for absolute mode in defining arc centers I, J, and K, while G91.1 calls for relative mode.

G91.1 is the default.

I have never added either, and I have processed a lot of circles and arcs.

If you call “G90.1 G91.1”, as you have shown, you simply are re-selecting the default behavior.

Gene

Perhaps there are machines that require the standard to be explicit?

I am certain that Linuxcnc does not require anything explicit in that regard, and I believe Mach 3 also uses relative arc centers as a default.

In any case, using two opposite commands in a row is not necessary.

The “machine” is not important if we are talking about Linuxcnc and Mach 3. As for other controllers, I have no idea.

Gene

just bumping this to confirm that linuxcnc remains the appropriate postprocessor to use for mach3?

(my mach 3 arrives from China in the next month or so! woot!!)

If this is the case I’ll update the wiki

I would like to thank @chrisb for his incredible comment which saved me much frustration.

I use an old mill that is being operated using Mach3. He is right! Arcs would not execute correctly unless you add “G91.1” to the preamble part of the program.

Thank you for sharing your knowledge and persisting with your finding.

I’m glad I could help with just a guess :smiley: .

For what it’s worth, I use Mach3 and ended up tweaking the default mach3_mach4 post processor to explicitly output G91.1, and if needed, the option to output absolute arc centers by entering --abs-arc in the arguments list for the post processor. Note that G90.1 is explicitly output in this case so Mach doesn’t get confused. The attached post processor was also tweaked to allow for multiline pre- and post-ambles by adding \n to those strings - i.e., --preamble “G17 G40 G80 G90” would become --preamble “G17 G40\nG80 G90” so G17 G40 ends up on one line and G80 G90 on the next. Lastly, the post processing also includes a tweak to add a linefeed to the last line of gcode so Mach3 doesn’t ignore it - i.e., in my case, M30 in my post-amble was being overlooked. Anyway, the attached code works for my purposes and solved all my problems, but your mileage may vary.