Community
Fusion Manufacture
Talk shop with the Fusion (formerly Fusion 360) Manufacture Community. Share tool strategies, tips, get advice and solve problems together with the best minds in the industry.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modifying Postprocessor for Mach4

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
trains420
761 Views, 6 Replies

Modifying Postprocessor for Mach4

Hello, I use Mach 4 on two machines. I have a problem with tool diameter compensation. In mach4, tool diameter correction can be entered in two ways:

 

Format 1: G00 / G01 G41 / G42 D__ X__ Y__ F__
Format 2: G00 / G01 G41 / G42 P__ X__ Y__ F__

 

Format 1 uses D to determine the tool diameter from the tool table.
Format 2 uses P to specify the tool radius (P5, P8, ...)

 

The point is that the Postprocessor for Mach 4 generates P, and I need to generate D with the appropriate tool number. When there is P in the program, I cannot edit tool corrections in the machine.

 

Can you help me ? Thank you in advance.

6 REPLIES 6
Message 2 of 7
seth.madore
in reply to: trains420

So you want it to post out:

T1M6

G43H1

G1G41X__Y__D1

 

Is the above correct?

 


Seth Madore
Customer Advocacy Manager - Manufacturing
Message 3 of 7
trains420
in reply to: seth.madore

Yes. The "D" with the correct tool number must be used wherever "P" is now (at multiple depths).
Message 4 of 7
seth.madore
in reply to: trains420

So, it's going to take a couple small edits. The changes that I've listed below are from a STOCK Mach4 post, so it may differ slightly if you are running any changes

At line 118, we are going to change this:

var pFormat = createFormat({prefix:"P", decimals:(unit == MM ? 3 : 4), scale:0.5});

to this:

var pFormat = createFormat({prefix:"D", decimals:0});

And then we are going to scroll all the way down to line 1234 and 1238

and change the cutter comp sections from:

writeBlock(gMotionModal.format(1), gFormat.format(41), x, y, z, f, pOutput.format(tool.diameter));

to:

writeBlock(gMotionModal.format(1), gFormat.format(41), x, y, z, f, pOutput.format(tool.number));

Seth Madore
Customer Advocacy Manager - Manufacturing
Message 5 of 7
trains420
in reply to: seth.madore

Yes, it looks like it works. Thank you very much for your help.

Message 6 of 7
Stuart-H
in reply to: seth.madore


@seth.madore wrote:

So, it's going to take a couple small edits. The changes that I've listed below are from a STOCK Mach4 post, so it may differ slightly if you are running any changes

At line 118, we are going to change this:

var pFormat = createFormat({prefix:"P", decimals:(unit == MM ? 3 : 4), scale:0.5});

to this:

var pFormat = createFormat({prefix:"D", decimals:0});

And then we are going to scroll all the way down to line 1234 and 1238

and change the cutter comp sections from:

writeBlock(gMotionModal.format(1), gFormat.format(41), x, y, z, f, pOutput.format(tool.diameter));

to:

writeBlock(gMotionModal.format(1), gFormat.format(41), x, y, z, f, pOutput.format(tool.number));

Seth. don't forget the other bit

 

case RADIUS_COMPENSATION_RIGHT:
dOutput.reset();
writeBlock(gMotionModal.format(1), gFormat.format(42), x, y, z, dOutput.format(d), f );
break;
default:
writeBlock(gMotionModal.format(1), gFormat.format(40), x, y, z, f);

 

Taken from my PP for Mach 4

Mac Studio M1Max and MacBook Pro M1
Message 7 of 7
seth.madore
in reply to: Stuart-H

@Stuart-H yes, that was the "and 1238" bit, I should have clarified.

1234 was the section for comp Left

1238 was the section for comp Right

Both need changing

 


Seth Madore
Customer Advocacy Manager - Manufacturing

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report