Hello Guest it is April 29, 2024, 02:54:05 AM

Author Topic: Mach4 Post Processor Fusion360 Editing to move Z to safe 1st  (Read 960 times)

0 Members and 2 Guests are viewing this topic.

Mach4 Post Processor Fusion360 Editing to move Z to safe 1st
« on: December 07, 2022, 09:53:24 AM »
The problem  I am having is that the stock Mach4 post processor for milling is outputting the following code at the beginning, moving from the XYZ zero position to the first part of the operation without moving to a safe height 1st.  Here are the 1st few lines of output G-code:

(1001)
(T8 D=6.35 CR=0. - ZMIN=-7. - FLAT END MILL)
G90 G94 G91.1 G40 G49 G17
G21
(WHEN USING FUSION 360 FOR PERSONAL USE, THE FEEDRATE OF)
(RAPID MOVES IS REDUCED TO MATCH THE FEEDRATE OF CUTTING)
(MOVES, WHICH CAN INCREASE MACHINING TIME. UNRESTRICTED RAPID)
(MOVES ARE AVAILABLE WITH A FUSION 360 SUBSCRIPTION.)
G28 G91 Z0.
G90

(2D CONTOUR1)
M5
T8 M6
S2000 M3
G54
M8
G0 X38.032 Y157.831
G43 Z15. H8
G1 Z5. F50.
Z-6.365 F17.



I think the highlighted line shout be written before the line above it.  What is happening is it moves the tool to the G0 X38.032 Y157.831 1st dragging the tool across the surface, often hitting things I don't want it to.  If it moved to G43 Z15. H8  1st, this wouldn't happen.  



I know I can edit the gcode after the fact, but that seems like a thing that could easily be fixed in the post-processor.  Unfortunately, I don't know what to change to make that happen.



Like this:

G28 G91 Z0.
G90

(2D CONTOUR1)
M5
T8 M6
S2000 M3
G54
M8
G43 Z15. H8

G0 X38.032 Y157.831

G1 Z5. F50.
Z-6.365 F17.
Re: Mach4 Post Processor Fusion360 Editing to move Z to safe 1st
« Reply #1 on: December 07, 2022, 12:26:40 PM »
The code is correct i tried it.
Above your line (2D contour)
 G28 G91 Z0
Re: Mach4 Post Processor Fusion360 Editing to move Z to safe 1st
« Reply #2 on: December 07, 2022, 01:24:52 PM »
Then How do I get it to go to, say z15 before moving the tool, not after? As I understand G28 is basically "start at zero" which is what I want but I don't want the tool to move until it has moved the z-axis up to clear any work holding etc.
Re: Mach4 Post Processor Fusion360 Editing to move Z to safe 1st
« Reply #3 on: December 07, 2022, 01:38:20 PM »
G91 G28 Z0. will move to what the machine thinks is 0.00.  Again... what the MACHINE Z 0.00 position is. 
If you don't have home switches to reference your machine, then you need to select the "No" option on safe retracts in the post properties.

The G43 Z15. H8 applies the tool offset to tool 8 and then moves to the Work Coordinate Position Z 15.00.  So whatever work offset you are in, it will move to Z 15.00 with the tool height offset applied. 
Chad Byrd
Re: Mach4 Post Processor Fusion360 Editing to move Z to safe 1st
« Reply #4 on: December 07, 2022, 01:47:13 PM »
I don't have the homing switches set up (I'm making brackets for them now and where the problem became evident) so maybe I'll 3d print them and it will work.  BUT the option you recommend does not exist in the post-processor and I've tried all 3.
Re: Mach4 Post Processor Fusion360 Editing to move Z to safe 1st
« Reply #5 on: December 07, 2022, 01:51:27 PM »
That'd be awesome, 3D print some brackets!
Also, that is the Mach3 Post Processor.
Chad Byrd
Re: Mach4 Post Processor Fusion360 Editing to move Z to safe 1st
« Reply #6 on: December 07, 2022, 01:55:35 PM »
It says its the Mach 3 post-processor in the script BUT it is the Mach4 one that I downloaded I think the person ho posted it forgot to change the text I've double-checked.  Also, Mach 3 has the same issue with my router, but that's another topic.  Why won't the z move to a safe position before moving across the parts I can't 3d print everything that's why I built a CNC mill.
Re: Mach4 Post Processor Fusion360 Editing to move Z to safe 1st
« Reply #7 on: December 07, 2022, 01:59:25 PM »
I would be certain that you have the correct post processor.  I have never had mine say mach3 since I've been using the mach4 post processor.

I'll attach one that I've modified pretty heavily.  Use at your own risk, but it is current.

Also, to answer your question from an earlier post, the Z move after the X and Y move is there because it assumes that the machine is at a safe plane.  I'm not sure why your machine isn't at a safe position since you have the "Clearance Plane" option selected.
« Last Edit: December 07, 2022, 02:03:27 PM by Cbyrdtopper »
Chad Byrd
Re: Mach4 Post Processor Fusion360 Editing to move Z to safe 1st
« Reply #8 on: December 07, 2022, 03:04:45 PM »
I downloaded a new copy of the Mach4 post-processor.  and here is what I found.  It still does it.  Moves the X&Y before the Z goes up to the clearance height.
Re: Mach4 Post Processor Fusion360 Editing to move Z to safe 1st
« Reply #9 on: December 07, 2022, 03:13:40 PM »
You'll need to get some home switches on your machine.  At least the Z to operate safely. 
However, you can get it to work without dragging across your parts if you set your Safe Retracts to "NO" and make sure that, when you start, the tool is above the part. 
The code posted Safe Retracts set to NO will move to X and Y and then apply the Tool Length Offset with the G43 line. 
At this point it is on the operator (you) to make sure it is starting safely above the part.  Without any reference, the machine doesn't know where it's "safe position" is.  So it is on you to define that for the machine with some preparatory moves manually. 
Alternatively, you could home the machine in place at a safe Z position way above the part.  You would have to make sure your Z Work Offset is updated after each "homing".
Try posting the code with no retracts and make sure your tool is above the part.
If you have subsequent tools that are longer, you will probably have to jog the Z up to change the tool; in which case you are ensuring that it is high enough to start as well.
Chad Byrd