POSTPROCESSORS FOR LANGMUIR CROSSFIRE - M3 & FireControl - ATTN sliptonic

Here's the place for discussion related to CAM/CNC and the development of the Path module.
dodadsshop
Posts: 4
Joined: Thu Jul 22, 2021 1:07 am

POSTPROCESSORS FOR LANGMUIR CROSSFIRE - M3 & FireControl - ATTN sliptonic

Postby dodadsshop » Thu Jul 22, 2021 2:20 am

Three FreeCAD postprocessor files are attached with comments for line numbers that were added / changed from FreeCAD's Mach 3 /4 postprocessor:

1. The FreeCAD supplied postprocessor for Mach 3 / 4.
2. Leon Corley's modification of the FreeCAD Mach 3 / 4 to work with Langmuir Crossfire using Mach 3.
3. Lewis Hirschy's modification of Leon's postprocessor to work with Langmuir Crossfire using their newer FireControl system. The code additions were recommended by Langmuir technical support. Their purpose is to support Langmuir's new torch height control (THC) with a Z axis stepper-motor. Lucky for me they were very simple changes as I'm very new to Python programming. I have more explanation from Langmuir if needed.

Two more files attached:

4. Lewis' postprocessor produced gcode output for a very simple FreeCAD model (2" square with a centered 1" hole). Note that the gcode contains scientific notation whereas the raw gcode in FreeCAD does not.
5. The FreeCAD model.

Sliptonic, let me know if you need any additional information.

Thanks so much for the help.
Lewis

PS My new user name is in honor of my three grandsons who love to do projects with me in my shop :D
Attachments
FreeCAD-2 IN SQUARE with 1 IN HOLE.FCStd
(24.24 KiB) Downloaded 3 times
FreeCAD-2 IN SQUARE with 1 IN HOLE - Crossfire with Fire Cont Post.tap.txt
(1.69 KiB) Downloaded 2 times
mach3_mach4_post.py
(16.81 KiB) Downloaded 4 times
crossfireFIRECONTROL_post.py
Lines changed / added: 24 thru 26, 83, 93, 100, 105 thru 113, 198,
(19.15 KiB) Downloaded 2 times
crossfire_post.py
Lines changed / added: 24, 81, 87 thru 90, 313, 315, 321, 358, 364 thru 390, 439, 441, 442,
(18.83 KiB) Downloaded 2 times
User avatar
sliptonic
Posts: 2301
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: POSTPROCESSORS FOR LANGMUIR CROSSFIRE - M3 & FireControl - ATTN sliptonic

Postby sliptonic » Thu Jul 22, 2021 8:00 pm

The scientific notation is occurring because of the change made to the precision_string at about line #330. The trailing 'f' was replaced with a 'g' and the comment: :'g' instead of 'f' removes trailing zeroes

According to the python help for the format function

‘g’
General format. For a given precision p >= 1, this rounds the number to p significant digits and then formats the result in either fixed-point format or in scientific notation, depending on its magnitude.


I restored the 'f' in the precision string and it returns correctly formatted floats.

If you really need to strip the trailing zeros this way, you have two options. Either explicitly set the precision level higher by passing the precision flag in the posprocessor args:
--precision=4

Your results may be inconsistent because the format depends on the magnitude.

Alternatively, you could rework the postprocessor where it's outputting the string to strip the trailing zeros. at that point rather than rely on the formatting string.
dodadsshop
Posts: 4
Joined: Thu Jul 22, 2021 1:07 am

Re: POSTPROCESSORS FOR LANGMUIR CROSSFIRE - M3 & FireControl - ATTN sliptonic

Postby dodadsshop » Thu Jul 22, 2021 8:59 pm

Thanks for the prompt analysis. I will implement your suggestions, test a revised postprocessor and post my findings here.

Regards,
Lewis
dodadsshop
Posts: 4
Joined: Thu Jul 22, 2021 1:07 am

Re: POSTPROCESSORS FOR LANGMUIR CROSSFIRE - M3 & FireControl - ATTN sliptonic

Postby dodadsshop » Fri Jul 23, 2021 5:49 pm

I changed "g" to "f" per your suggestion and the post worked to produce gcode with no scientific notation. So, I see no need to get complicated to make the general format work.

When using units in mm (which is the default for the post), a precision of 2 is fine for my machine. I therefore changed the precision flag (line ~ 86) from 3 to 2 but my output was still showing 3 places to the right of the decimal. Do I need to change something else?

I plan to test the gcode output on my Crossfire soon. Will let you know how it goes. I do not have the Torch Height Control (THC) option so the testing will not be complete; however, I got the code from Langmuir and inserted it in the post so it should work on a Crossfire FireControl machine with THC. In Langmuir's FireControl software you can select whether you want to use THC so my testing will obviously be with THC off. FireControl also allows selection of "inches" or "mm" so "mm" will be selected for my testing.

I mentioned earlier that several people with Crossfires are not pleased with Fusion360 for several reasons. Obviously I'm one of them. If the post you've been helping me with works on my Crossfire I'll put it out on the Langmuir Forum and I bet there will be several more FreeCAD users in short order.

Thanks Again,
Lewis
dodadsshop
Posts: 4
Joined: Thu Jul 22, 2021 1:07 am

Re: POSTPROCESSORS FOR LANGMUIR CROSSFIRE - M3 & FireControl - ATTN sliptonic

Postby dodadsshop » Sat Jul 24, 2021 9:48 pm

Got it working for my Langmuir Crossfire plasma cutter with FireControl (mine does not have the Torch Height Control). Am waiting on a discussion with Langmuir before posting on Forums.

Thanks for your work in general and help in particular on this postprocessor,
Lewis