Community
HSM Post Processor Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Newbie, want to tweek post processor

15 REPLIES 15
SOLVED
Reply
Message 1 of 16
Anonymous
879 Views, 15 Replies

Newbie, want to tweek post processor

I am very new to CAM and have never touched a post processor before.  I am currently using the generic Fanuc post processor, but am having to add a couple of very minor manual edits to the post everytime.  Surely these are fairly basic tweeks - can anyone walk me through it?

 

1.  It posts an M01 before each tool change, except for the first tool change of the program.  I'm not sure why it doesn't, it would only make sense.  So every time I post I am manually putting in an M01 just before the first operation's comment.

 

2.  To further the above, it would be really nice if it put an M01 before each operation, not just each tool change.

 

3.  Air does not work - if I select "air" as my coolant, I get an error when trying to post.  So if I want to use air, I have to open the post and manually replace M08 with M53, and M09 with M54.

 

So far I am loving CAM/HSM, but these three tweeks to the post would completely eliminate any need to manually edit the program at all.

 

Any help appreciated!

 

Thanks,

Chris

15 REPLIES 15
Message 2 of 16
Anonymous
in reply to: Anonymous

Hi there,

 

I am looking into 1 and 2 still, but the coolant in number 3 is a simple fix.

 

In the below screenshot is the final part that I changed. The following changes were:

 

1. Line 2086 at the end, changed what was "89 : 9));" to "89 : 54));" to change the coolant being turned off from M09 to M54

2. After line 2098 added

" case COOLANT_AIR:

    m = 53;

    break;

"

This adds the air option to the post so it no longer throws the coolant not supported error. 

 

Solution.png

 

After these changes the Code looks ok, but you'll have to check it out and see for yourself if it produces the expected response.

 

Good Luck,

Anthony

 

 

Message 3 of 16
Anonymous
in reply to: Anonymous

Ok so I think I have got number 1 and 2 all sorted now. Though this one is a little more complex.

 

Solution.png

 

Ok because of edits and such the line numbers may not line up exactly, but they should be around about right. For reference this is in the OnSection part of the code.

 

The edits I have done are in RED and are as follows

 

1st Red box. All of this is new code. It checks if the current tool is the same as the old one and makes sure that its not the first section (cause then there would be no previous one) and adds the M01, I believe this was your part 2.

 

The second red box is code that was already there, I just commented out the 1st and 3rd line, so that no matter what the case, every time it throws a tool change call it also call M01.(Regardless of whether it is the first section or not)  (This was your question 1 I believe)

 

As a quick follow up, by commenting out that if statement in the 2nd red box, you remove the optional stop from properties from having any effect. I can do another edit, but by the sounds of it you won't ever want to turn the optional stop off so this should work just fine.

 

Anyway give it all a test and let me know how it goes!

 

Cheers,

Anthony

Message 4 of 16
Laurens-3DTechDraw
in reply to: Anonymous

@Anonymous

Pretty sure you now only get an M01 for when it's the same tool and not the first section.

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


Message 5 of 16
Anonymous
in reply to: Laurens-3DTechDraw

Nope, I have tested it. That would be the case if I had completely commented out all of the 2nd Red box, but because I only commented out the if parts, the bit inside just always runs whenever there is a tool change, rather than checking if it needed one or not.

 

Below is the test output I created:

 

%
O0001
(T1 D=6. CR=3. - BALL END MILL)
(T3 D=6. CR=0. TAPER=118DEG - DRILL)
N10 G90 G94 G17 G49 G40 G80
N15 G21
N20 G28 G91 Z0.
N25 G90

(DRILL1)
N30 M01
N35 T1 M06
N40 T3
N45 S20000 M03
N50 G54
N55 G68.2 X0. Y0. Z0. I90. J0. K0.
N60 G53.1
N70 G00 X78.024 Y-19.
N75 G43 Z34.5 H01
N85 G00 Z33.5
N90 G98 G81 X78.024 Y-19. Z-1. R33.5 F1000.
N95 X188.024
N100 G80
N105 Z34.5
N115 G28 G91 Z0.
N120 G90

(DRILL1 2)
N125 M01
N130 G68.2 X0. Y0. Z0. I-90. J0. K0.
N135 G53.1
N145 G00 X78.024 Y19.
N150 G43 Z34.5 H01
N160 G00 Z33.5
N165 G81 X78.024 Y19. Z-1. R33.5 F1000.
N170 X188.024
N175 G80
N180 Z34.5
N190 M05
N195 G28 G91 Z0.
N200 G90
N205 G49

(DRILL1 3)
N210 M01
N215 T3 M06
N220 T1
N225 S2020 M03
N230 G54
N235 G68.2 X0. Y0. Z0. I-90. J0. K0.
N240 G53.1
N250 G00 X78.024 Y19.
N255 G43 Z34.5 H03
N265 G00 Z33.5
N270 G81 X78.024 Y19. Z-1. R33.5 F173.
N275 X188.024
N280 G80
N285 Z34.5

N295 G28 G91 Z0.
N300 G49
N305 G69
N310 G28 X0. Y0.
N315 M30
%

 

 

I am aware that this is maybe not the ideal solution code wise, having two statement like that and all, but it seems the simplest edits for someone else to copy and replicate them selves and not have to rewrite a part of that section.

 

 

Message 6 of 16
Laurens-3DTechDraw
in reply to: Anonymous

Isn't it much easier to just comment out the whole if in the if(insertToolCall)

and just place the onCommand(COMMAND_OPTIONAL_STOP); just about that line?

Then you just have to add one line.

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


Message 7 of 16
Anonymous
in reply to: Laurens-3DTechDraw

I did think of that, but didn't want to mess up the ordering within the tool change block, for example, it turns the coolant off before it does the optional stop. If I did that, it would be a more simple solution but would change order when a tool change is required and I wanted to keep it as close to the original functionality, give I'm not the one actually running and testing it on a machine.

Message 8 of 16
Anonymous
in reply to: Anonymous

It seems to work except it replaces ALL M09's with M54's.  Any way around this?

 

The M01's work.

 

Thanks!

Message 9 of 16
Anonymous
in reply to: Anonymous

I forgot #4:

 

At the end of the program it posts "G28 X0. Y0." - I manually delete the X0. so that the machine table just moves forward to the operator for a part change.  Can you show me how to that in the post processor also?

 

Thanks

Message 10 of 16
Anonymous
in reply to: Anonymous

Ok in answer to the first part, I thought it was the desired effect, but here is the fix.

 

Solution.png

 

That block highlighted in red needs to be changed to:

 

Solution.png

 

Basically now it looks at the coolant and gives the right M code based on that, (8&9 for flood, 53&54 for air and 88&89 for through tool.

 

Think this is what you are wanting. 

 

Cheers,

Anthony

Message 11 of 16
Anonymous
in reply to: Anonymous

For this one #4,

 

Find this line:

 

Solution.png

 

And delete the following from it " "X" + xyzFormat.format(0)," so that now the full line looks like:

 

 writeBlock(gFormat.format(28), gAbsIncModal.format(91), "Y" + xyzFormat.format(0)); // return to home

 

That should do it for you!

 

Cheers,

Anthony

Message 12 of 16
Anonymous
in reply to: Anonymous

Perfect!  I will verify it tomorrow, but with these changes I shouldn't have to change anything manually after posting.

 

Thanks!

Message 13 of 16
Anonymous
in reply to: Anonymous

After the last few changes, the air has stopped working.  Now I get the following when trying to post a program using air:

 

Post error.png

 

When not using air, it posts without error.

Everything else is working.

 

Message 14 of 16
Anonymous
in reply to: Anonymous

To verify, I commented out the last (coolant related) updates and and reverted to the previous, and the air is working again (albeit with the previous issue of replacing all M9's with M54's).

 

I looked it over thinking I may have mis-copied your edits, but I can't see anything:

 

 

Post.png

Message 15 of 16
Anonymous
in reply to: Anonymous

First issue is in the stuff that you commented out, the second case in the switch statement you have "writeblock" when it should be "writeBlock" JS is case sensitive and that is why it is throwing the error.

Message 16 of 16
Anonymous
in reply to: Anonymous

That did it.  All is good now, Thank you!

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report