What's new
What's new

Messing with modifying posts (what makes a good post?)

plutoniumsalmon

Hot Rolled
Joined
May 27, 2014
Location
Los Angeles
Hello.

I got myself a year of NX Cam and am messing around with it. Besides the obvious answers (it doesn't crash the machine) can you please tell me what makes a good post. I am, primarily a HSM user for milling and have just ran the VF2 with the post that autodesk has on their website. Now that I have NX I see that I can relatively easily modify thee post that I got from Swoosh. It outputs slightly differently. Should I modify it to match HSM post? Leave it alone? Or do something else? Are there best practices for this?


Thank you.
 
A good post is one that doesn't crash your machine and doesn't output random codes that make no sense in that context.

For example, my 5 axis postability post outputs some wonky stuff on purpose...it retracts Z and moves to g53 home the A and C rotary axes in between ops. I asked them specifically to have the post do this for me. It's annoying sometimes but it serves a purpose because you will never crash the trunnion because of a position error or a retract plane that wasn;t high enough.

A good post outputs coolant commands when you want them to. It outputs the needed codes in the correct order with correct syntax. Everything beyond that is just preference.

If you can post the 2 separate codes to see the differences, maybe that would help?
 
A good post is one that works. Bottom Line. It should be bullet proof (to an extent), it should post what you want to see, IE comments, coolant on and off at the correct lines, etc...

One thing to watch out for if you do 5 axis work, make sure it is outputting G17/18/19 correctly, and at the right time. I had a post that would randomly not switch back to G17.... ouch!! I (we, the company) had it modified to output a G17 line at the end of every tool change, just in case... since most of the work was 3 axis....
 
I would say a good post is one that almost never needs hand editing.

Such as if you post a program with one tool you don't want a post that outputs

T03
M06
T03

On lots of machines this will cause an alarm.

Very basic and easy to prevent yet many post writers fail in this department.
 
No hand edits required.
No spurious / redundant codes
Easily readable output, with spacing and blank lines where appropriate
N numbers only at toolchanges and context changes (new operation with same tool etc.)
Machine motion EXACTLY matches the simulated toolpaths (WYSIWYG, no exceptions - you want special retracts, home moves, whatever - figure out how to do it in the cam, NOT in the post)
Clear and sensible comments (tool code/name at toolchanges, description of operation etc, date and time when posted on the second line after the program name)
 
Hi PS:

In addition to what Gregor has stated above, I would also add things like "safe start" blocks at every toolchange, so that you can do mid-program restarts w/o having to worry if your non-modal commands are set the way you want....makes for much less "excitement" at the machine!

I mentioned this a few days back in another post, but CNC Concepts Inc/Mike Lynch's training materials go into this sort of thing: CNC Books | CNC training | CNC Concepts, Inc.

Cheers, Brian
 
I believe a good post would start with a good programmer. Second recognizing how the software works and the output your programs make. Third is what type of machines you are programming for and what kind of format you need or want. I have post for some my machines that I hand edit all the time because of minor format issues or just better way of optimization with minor tweaks. I have some post that I rarely hand edit. most post for machines will work fine but is the custom format people want to see that makes it difficult at times.
 
To add a little more context, it is very software dependant AND machine dependant. I use Mastercam so that's what I know. I don't know much about post editing with Fusion but could probably figure it out cuz its all Java or XML stuff.

Ive crashed my machine because there were "H" commands calling out height z offsets for each tool. Well, if you do that on a HURCO you better have your tools set in the Tool Offset page and NOT on the tools page. We had them remove the H callouts to ensure that I was never gonna have a Z crash like that again. On most fanuc posts youll see each tool has an H callout for referencing the tool gauge length. Hurco can do that but it depends how you want to set up the machine and the tools.

So we get this code instead
( T20 | 5/8" SPOT DRILL | H20 )
( T80 | NO. 16 DRILL | H80 )
G20
G0 G17 G40 G49 G80 G90
T20 M6
G0 G90 G54 X-1.0937 Y0. S6000 M3
G43 Z.11 T80
G99 G81 Z-.08 R.11 F5.
X-1.5137
G80
M5
G90 G0 G53 Z0.
M01
T80 M6

with no H callouts.

Its very machine specific!
 
NX has a terrific post building tool. It is pretty straight forward. Copy the post you want to modify (make a backup) then start changing some minor things (coolant/m-codes) until you get the feel for it. Congrats on your NX purchase. I is a great software!
 
NX has a terrific post building tool. It is pretty straight forward. Copy the post you want to modify (make a backup) then start changing some minor things (coolant/m-codes) until you get the feel for it. Congrats on your NX purchase. I is a great software!

They changed that tool. It now needs a license for the complex stuff. You can still use post builder but you can't modify that post using the new tool and vice versa. The post that I have is the new generation one.
 
For me, it's no "mystery" or redundant codes (which sometimes happen when you're starting from a post that someone else wrote), "safe start" codes at the beginning of the program and at each tool change, good, clear commenting and I like a couple extra blank lines between each program segment - makes it easier to spot block starts when you're scrolling through a bazillion lines of code, on a machine control.
 
***Post Processor Output***
(excess)

( T20 | 5/8" SPOT DRILL | H20 )
( T80 | NO. 16 DRILL | H80 )
G20
G0 G17 G40 G49 G80 G90
T20 M6
G0 G90 G54 X-1.0937 Y0. S6000 M3
G43 Z.11 T80
G99 G81 Z-.08 R.11 F5.
X-1.5137
G80
M5
G90 G0 G53 Z0.
M01
T80 M6


***Human Output w/CAM aid.***

T20 M6 (5/8 SPOT DRILL)
G17G20G40G49G54G80G90G98

G0 X-1.0937 Y0.
G43 Z0.1 H20 S6000 M3 T80 ------ (If H used add here)
M8
G99 G81 Z-0.08 R0.1 F5.
X-1.5137
G80
M9
G53 Z0.M5*
M01**

T80 M6 (NO. 16 DRILL)
G17G20G40G49G54G80G90G98


:-) Sorry but couldn't help myself. Posts with extra garbage and general disarray make me crazy.

*Block - G53 Z0.M5----- Not needed on many machines as the tool change macro will handle it.
**M01 -----As the code implies, not needed unless you've got occasional between tool plans.

In general on a VMC - center table or work in X and Program End with -

G53Z0.Y0.M5
M30

All In...

T20 M6 (5/8 SPOT DRILL)
G17G20G40G49G54G80G90G98

G0 X-1.0937 Y0.
G43 Z0.1 H20 S6000 M3 T80
M8
G99 G81 Z-0.08 R0.1 F5.
X-1.5137
G80
M9

T80 M6 (NO. 16 DRILL)
G17G20G40G49G54G80G90G98

G0X___Y___
etc
etc
G53Z0.Y0.M5
M30
 
***Human Output w/CAM aid.***

T20 M6 (5/8 SPOT DRILL)
G17G20G40G49G54G80G90G98

G0 X-1.0937 Y0.
G43 Z0.1 H20 S6000 M3 T80 ------ (If H used add here)
M8
G99 G81 Z-0.08 R0.1 F5.
X-1.5137
G80
M9
G53 Z0.M5*
M01**

T80 M6 (NO. 16 DRILL)
G17G20G40G49G54G80G90G98


:-) Sorry but couldn't help myself. Posts with extra garbage and general disarray make me crazy.

*Block - G53 Z0.M5----- Not needed on many machines as the tool change macro will handle it.
**M01 -----As the code implies, not needed unless you've got occasional between tool plans.

In general on a VMC - center table or work in X and Program End with -

G53Z0.Y0.M5
M30

All In...

T20 M6 (5/8 SPOT DRILL)
G17G20G40G49G54G80G90G98

G0 X-1.0937 Y0.
G43 Z0.1 H20 S6000 M3 T80
M8
G99 G81 Z-0.08 R0.1 F5.
X-1.5137
G80
M9

T80 M6 (NO. 16 DRILL)
G17G20G40G49G54G80G90G98

G0X___Y___
etc
etc
G53Z0.Y0.M5
M30

LOL i appreciate the input with optimizing the output but what exactly does that do for me except make it prettier? In fact if I'm at the machine reviewing gcode before running then this:

"G0 G17 G40 G49 G80 G90"
is alot easier to read than this:
"G17G20G40G49G54G80G90G98"

Also the tool list at the beginning is actually the program header which I included for no real reason.
 
LOL i appreciate the input with optimizing the output but what exactly does that do for me except make it prettier? In fact if I'm at the machine reviewing gcode before running then this:

"G0 G17 G40 G49 G80 G90"
is alot easier to read than this:
"G17G20G40G49G54G80G90G98"

Also the tool list at the beginning is actually the program header which I included for no real reason.

Prettier? Gee thanks! :-). No really... just leaving out redundancy and cleaning up a bit of the scattershot nature of your post. There's meaning behind each line and why it's in the order it goes. All the way from the tool change to the M8. Every tool run includes those same lines in the same order with the same type of info. Makes it easy to follow when scrolling through long programs or even when single blocking through the first run. Also the tool moves in a safe manner, regardless of the work or fixturing on the table at the time. That's because the first lateral move is always with the Z head completely retracted at the tool change position. What could be safer?

That safety line is not something you actually read. From constant use you already know what's in it. It's just there to make sure the machine is in a known state before every tool. Including it with the tool change line and following with a blank line makes a new tool call easy to see.

I understood the program header nature of your post. I use one too. I was simply showing how carrying those tool ID's through the program makes it easier to know what say tool 8 is, 500 blocks deep in the program. You're running 30 tools on a job, seeing a T8M6 half way through isn't going to tell you much on its own. It also keeps you from having to look at some setup sheet to find out.

I'm sure you'll come up with something that works for you. Everybody has their preferences. Was just offering an option to consider, that's all.
 
Prettier? Gee thanks! :-). No really... just leaving out redundancy and cleaning up a bit of the scattershot nature of your post. There's meaning behind each line and why it's in the order it goes. All the way from the tool change to the M8. Every tool run includes those same lines in the same order with the same type of info. Makes it easy to follow when scrolling through long programs or even when single blocking through the first run. Also the tool moves in a safe manner, regardless of the work or fixturing on the table at the time. That's because the first lateral move is always with the Z head completely retracted at the tool change position. What could be safer?

That safety line is not something you actually read. From constant use you already know what's in it. It's just there to make sure the machine is in a known state before every tool. Including it with the tool change line and following with a blank line makes a new tool call easy to see.

I understood the program header nature of your post. I use one too. I was simply showing how carrying those tool ID's through the program makes it easier to know what say tool 8 is, 500 blocks deep in the program. You're running 30 tools on a job, seeing a T8M6 half way through isn't going to tell you much on its own. It also keeps you from having to look at some setup sheet to find out.

I'm sure you'll come up with something that works for you. Everybody has their preferences. Was just offering an option to consider, that's all.

I see I see. Well regarding the tool callout,

G43 Z.11 T80

If that is what youre referring to, its calling to the toolchanger to get the next tool ready so theres not carousel wait time when the M6 code does inevitably come up for the tool change.

As far as getting the post modified for the changes you described...would you recommend my reseller or doing it myself?
 
I see I see. Well regarding the tool callout,

G43 Z.11 T80

If that is what youre referring to, its calling to the toolchanger to get the next tool ready so theres not carousel wait time when the M6 code does inevitably come up for the tool change.

As far as getting the post modified for the changes you described...would you recommend my reseller or doing it myself?

Not sure what comment of mine you're referring to about the tool call-out.

On the other hand - I understood that your T80 at the end of the G43 line was getting the next tool in the carousel ready so there's no wait. I did the same in my example, (G43 Z0.1 H20 S6000 M3 T80) and also do that in my actual programs like I think many people do.

I use an ancient BobCAD and modified the post (what tiny bit I use of it) to suit my needs. I hadn't a clue how to do it. I simply opened the post, script file, and saw what was there and how that related to what appeared in my program when I viewed the output of the Post. A little trial and error but is wasn't completely out of reach. Of course I backed up the original before messing around with it. If you can make a secure backup first, I see no reason why you couldn't try your hand at modifying it. Who knows... could learn something new.
 
The Ideal Post, some ideas

For one, the code has to be output so that is as easy as possible to read - by you.

Along those lines, it should strip out extraneous moves, like the ones that command intermediate steps that the tool just runs through.

You need to be able to put COMMENTS in it from wherever you are in the part program - like "Flip Part YZ180".

And you should be able to generate your own postprocessor commands to do anything unique that you might come up with, and insert just the PPWORD, for example: GOCLER would command the axis and machine in two separate motions so that the table comes to you to do a part change. Depending on whether a horizontal or vertical mill, the post would handle the command appropriately.
 








 
Back
Top