Mach 4 Post Processor Edit to Change Z move Before XY move. I need it to stop dragging the tool tip across the part at the beginning.

Mach 4 Post Processor Edit to Change Z move Before XY move. I need it to stop dragging the tool tip across the part at the beginning.

steelbarz
Observer Observer
380 Views
3 Replies
Message 1 of 4

Mach 4 Post Processor Edit to Change Z move Before XY move. I need it to stop dragging the tool tip across the part at the beginning.

steelbarz
Observer
Observer

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.

 

None of the options in the dropdown for safe retracts seems to make any difference with that problem.

0 Likes
381 Views
3 Replies
Replies (3)
Message 2 of 4

j.mitch97
Advocate
Advocate

Hi @steelbarz 

 

your post is formatted correctly. G28 is the zero return command which should move your z to the top of the machine.

some machine use G53. have you tried to change this in the post?

 

change the value in the post (circled in red) to one of the title above, and test the new program.

g53.jpg

0 Likes
Message 3 of 4

engineguy
Mentor
Mentor

@steelbarz 

 

You need to change the way that you set up your CNC Machine, I see in your Code at the top a G28 G91 Z0, this command should be moving your Z axis to your set Machine Z0, (Usually the highest point that your Z axis goes to) not your Part Z0, let us look at your code.

(1001)
(T8 D=6.35 CR=0. - ZMIN=-7. - FLAT END MILL)
G90 G94 G91.1 G40 G49 G17
G21   Metric setting
(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.  This command moves the CNC to Machine Z0, either to a Limit Switch or a Soft Limit setting
G90  This sets the Mode, Incremental or Absolute, G90 is Absolute mode.

(2D CONTOUR1)
M5  Spindle OFF
T8 M6   Tool Change command
S2000 M3   Spindle rpm and Clockwise rotation start
G54  This is your WCS point that you match with your Setup in Fusion
M8   Coolant ON
G0 X38.032 Y157.831  CNC Rapids to start position reference that you have set your G54 to in your "Fixture Offsets"
G43 Z15. H8  CNC now Rapids to Z15 above the Stock using the Tool #8 length that you have set in your "Tool Table"
G1 Z5. F50.   CNC now moves at the Feed speed to Z5 above the Stock
Z-6.365 F17.  CNC now moves at Plunge Feed speed before it starts cutting.

 

If you CNC is not performing the moves as outlined above then it is your CNC Machine Setup, this is not a Fusion issue.

When you switch your CNC on let it warm up for a couple of minutes then do the Homing procedure.

1) Press Enable

2) Press Reference all Axis (Home)

3) Use the Offsets Screen to set your G54 to your Stock

4) Use the Offsets Screen again to set your Tool Length Offsets for your Tools

Those are the basics, if you want you can use the Probe Screen to get your Stock size and position

Load your code and go 🙂

As you are on a Free Personal licence then the Rapid moves will be done at your Cutting Feedrate.

The G43 line you mention is in the correct place in the code, does not need moving, think it is time to get the Mach4 Manual out and look at the setting up section 🙂 🙂

Apologies if this is not what you wanted to hear 😞

0 Likes
Message 4 of 4

j.mitch97
Advocate
Advocate

@steelbarz 

 

hope this helps you.

 

https://www.machsupport.com/wp-content/uploads/2014/05/Mach4%20Mill%20GCode%20Manual.pdf

 

page 19 tells you how G28 works & page will tell you how G53 works.

0 Likes