Post Processors 101

Post Processors 101

al.whatmough
Alumni Alumni
17,319 Views
10 Replies
Message 1 of 11

Post Processors 101

al.whatmough
Alumni
Alumni

 

 


What is a Post Processor?

CAM requires post processors to format toolpaths into CNC programs, a.k.a. G-Code. These CNC programs are executed by the CNC control to drive the machine as it removes material from stock to produce a finished part.

 

Where can I find post processors?

 

Before we dive into what a post is here is a quicl link to a web library of post processors.  Chances are, we have one that will work for you out of the box!

 

http://cam.autodesk.com/posts/

 

post library.png

 

 

 


Let's start by reviewing the basic steps of going from a CAD model to machined a part:

 

what is a post.png
post icon.jpg
How do I post a NC Program?


Fusion allows you to post a specific operation or Operations, Post a complete Setup or Post Multiple Setups into one program.  Simple select the Operations(s), Setup or Setups and Click post.


When posting multiple Setups you can even optimize the program to remove un-need tool changes!  Don't worry; it will never break the order of operations for a single setup.  But, before putting a face mill away, it does makes sense to see if that tool is the next one needed for one of the setups doesn't it?  If it is, the machine will retract to home in Z, move the other Setup and perform the facing operation!



What if the NC program isn't correct?post properties.png

Autodesk CAM Products include a variety of standard library post processors or "posts". If your machine is not listed in the post processor library then you may need to request a special post to be created. If the post for your machine is listed, you may need to have some modifications done to get the exact output you are looking for. Depending on your experience in machining and machine tool knowledge this may or may not be important to you. For others, such as professional CNC programmers - this is essential.

BEFORE, you request a post edit start by confirming that you can't make your required changes my modifying the POST parameters.


Basic parameters include:

AllowHelical moves - If your machine does not support helical moves it may machine an Arc and the plunge in Z.  Setting "Allow Helical moves" to False will convert all helical moves to small linear moves at the specified (Built-in) Tolerance

Show Sequence numbers - Specifies is Sequence numbers are output on each line


Some examples Advanced Parameters are:

Use G0 - Specifies if rapids that change in multiple Axis at are allowed.  If this is set to no, these moves will be output as a linear move (G01) at the Specified (Built-in) highFeedrate.  Machines that do not move in a linear fashion between to rapid points will produce what we "Dogleg rapid" that can potentially gouge parts.

UseG28 - While G28 should be a SAFE home position, some machines have G28 set at the top of the table.  So, when the machine homes at the begging or end of a program it plunges into part.  Setting UseG28 to false will not send the machine home at the beginning or end of the program.



What do I need to have a Post modified?

When having post customizations done, the best thing to do is to create simple part for each machine type in their CAD. This part should utilize all the processes you would normally use. Then post process the program with the closest generic post that is shipped with the system. When this is complete you should edit the NC output in an editor, and markup the output with comments showing what they want to change (don’t delete anything).

Here is an example of the best way to indicate the changes you require:

#1          HAVE THE COOLANT M8 BE ON THE LINE AFTER THE G43 LINE
#2          AT THE BEGINNING OF EACH TOOL HAVE THE WCS OUTPUT ON THE FIRST POSITIONING LINE
#3          PUT M9 AT END OF EACH TOOL BEFORE RETRACT TO Z HOME ?
#4          REMOVE X0. SO IT DOESN'T HOME IN X, JUST IN Y AT THE END OF THE CODE
#5          RECALL 1RST TOOL AT THE END OF THE FILE
#6          A N20 G28 G91 Z0. AT THE BEGINNING OF EACH TOOL JUST AFTER THE M1

%
O03091 (AVP 7)
(T1  D=0.25 CR=0. TAPER=90deg - ZMIN=-0.08 - spot drill)
(T2  D=0.257 CR=0. TAPER=118deg - ZMIN=-1.1272 - drill)
(T8  D=0.3125 CR=0. - ZMIN=-0.5 - right hand tap)
N10 G90 G94 G17
N15 G20
N20 G28 G91 Z0.
N25 G90
(Drill1)
N30 T1 M6
N35 T2
N40 S2500 M3
N45 G55
N50 M8
N60 G0 X4.5 Y-0.25
N65 G43 Z0.6 H1
N75 G0 Z0.2 (#1  PUT M8 HERE, JUST AFTER G43 LINE?)
N80 G98 G81 X4.5 Y-0.25 Z-0.08 R0.2 F20.
N85 X6.125
N90 X7.75
N95 G80 (#3      PUT M9 AT END OF EACH TOOL BEFORE RETRACT TO Z HOME ? )
N100 Z0.6
N105 M5
N110 G28 G91 Z0.
N115 G90
(Drill2)
N120 M9
N125 M1
N130 T2 M6
N135 T8
N140 S1000 M3
N145 M8
N155 G0 ( PUT WCS HERE ON EACH TOOL SECTION) X4.5 Y-0.25
N160 G43 Z0.6 H2
N170 G0 Z0.2 (#1    PUT M8 HERE, JUST AFTER G43 LINE?)
N175 G83 X4.5 Y-0.25 Z-1.1272 R0.2 Q0.1 P0 F3.
N180 X6.125
N185 X7.75
N190 G80 (#3    PUT M9 AT END OF EACH TOOL BEFORE RETRACT TO Z HOME ? )
N195 Z0.6
N200 M5
N205 G28 G91 Z0.
N210 G90
(Drill3)
N215 M9
N220 M1
N225 T8 M6
N230 T1
N235 S100 M3
N240 M8
N250 G0 X4.5 Y-0.25
N255 G43 Z0.6 H8
N265 G0 Z0.2
N270 G84 X4.5 Y-0.25 Z-0.5 R0.2 F5.5556
N275 X6.125
N280 X7.75
N285 G80
N290 Z0.6
N295 M9
N300 G28 G91 Z0.
N305 G28 X0. Y0. (#4      REMOVE X0. SO IT DOESN'T HOME IN X, JUST IN Y)
(#5        RECALL 1RST TOOL AT THE END OF THE FILE)
N310 M30
%

 





To obtain more information or request a post or post modifications please visit: http://forums.autodesk.com/t5/post-processors/bd-p/218
Because all Autodesk CAM tools utilize the same post processor system and CAM kernel we have a dedicated forum to discuss all things CAM.

I hope this was a help. 

Feel free to add comments if you feel I missed something!

---------
AL Whatmough
Director Product Management - Manufacturing

Note, I love to engage on the forums. However, I spend a lot of time in meetings trying to help clear the path for our amazing team of Developers working on Manufacturing at Autodesk. So, if I don't respond immediately, it's not that I don't care.
17,320 Views
10 Replies
Replies (10)
Message 2 of 11

Laurens-3DTechDraw
Mentor
Mentor
Only one addition.
If now know that your post needs to be modified, have a look here:

https://camforum.autodesk.com/index.php?topic=6138.0

Laurens Wijnschenk
3DTechDraw

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


Message 3 of 11

al.whatmough
Alumni
Alumni
Great add Laurens! 
---------
AL Whatmough
Director Product Management - Manufacturing

Note, I love to engage on the forums. However, I spend a lot of time in meetings trying to help clear the path for our amazing team of Developers working on Manufacturing at Autodesk. So, if I don't respond immediately, it's not that I don't care.
Message 4 of 11

scottmoyse
Mentor
Mentor
Nice post Al!

Scott Moyse
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature


RevOps Strategy Manager at Toolpath. New Zealand based.

Co-founder of the Grumpy Sloth full aluminium billet mechanical keyboard project

0 Likes
Message 5 of 11

matthew.nichols
Autodesk
Autodesk
Very nice post! 


Matthew Nichols
Adoption Specialist - MFG
0 Likes
Message 6 of 11

Anonymous
Not applicable

Thanks for posting this.  The one thing I can't find anywhere is documentation / manual for writing post processors.  I'm trying to answer really simple questions right now like:

 

What information do I have access to from a post processor?

Do I have access to what features are being milled for a particular range of GCODE?

etc.

Message 7 of 11

Laurens-3DTechDraw
Mentor
Mentor

See this thread: http://forums.autodesk.com/t5/post-processors/help-my-post-processor-needs-to-be-edited-now-what/td-...

Should include everything you are looking for.

Important pieces are the Dump.cps post processor and the help file.

There is a guide to making a post there that gives you a good feel for how posts are built. But there are some minor mistakes in it so see it as good reading.

Laurens Wijnschenk
3DTechDraw

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


Message 8 of 11

Anonymous
Not applicable

Thanks the manual you pointed me to is quite helpful.  After reading it, I have some questions about the runtime used to evaluate the .cps code.  In the manual, it says "The post processor file has an extension .cps which is based on Java Script".  What version of JavaScript?  Is it ECMAScript 5?  Is there any provision for loading in libraries into .cps files?  For example, I'd like to write a set of functions that I use in many .cps files.  It make sense to put those in a separate file and "require"/"load" them in to the different post processors.  Is there any way to run native code in a post processor ... is there some kind of foreign function interface for example?

 

thanks!

0 Likes
Message 9 of 11

Laurens-3DTechDraw
Mentor
Mentor

It is based on ECMA script indeed. But what version I'm not sure.

I'm quite curious why and what you are planning to do?

 

Maybe I can give some insight into how others have done such a thing.

Laurens Wijnschenk
3DTechDraw

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


0 Likes
Message 10 of 11

Anonymous
Not applicable

I'm mostly just trying to understand the limitations of what's possible and how you can organize a sizeable library of post processing scripts.  This is for thinking about some 5-axis CNC work where I will need to communicate with some external tools.  Maybe there's a lower level API that works with native code?  I saw something about an HSMWorks API but I can't seem to find any more details on that.

 

Thanks for your help.  How do people interface external code with HSM works with the intention of processing generated toolpaths?

0 Likes
Message 11 of 11

domingosf
Participant
Participant

Hello.
I'm using Inventor 2022 and CAM 2022 and some errors happen when I try to configure Post processing for fanuc turning.cps in Setup>Edit>Machine Configuration. See the figure below.
Note that in machining I do not use the Y axis.

In Setup > Select it is set to Generic Lathe.

 

domingosf_0-1653589575056.png

 

As I cannot configure the post processor in Setup, I cancel and access the Post Process option in ribbon, but an NC program is not generated and this error is displayed:

 

Information: Configuration: FANUC Turning
Information: Vendor: Fanuc
Information: Posting intermediate data to 'F:\AULA\CAM\LIVROS\INVENTOR CAM\2805.nc'
Error: Failed to post process. See below for details.
...
Code page changed to '1252 (ANSI - Latino I)'
Start time: Thursday, May 26, 2022 6:05:59 PM
Code page changed to '20127 (EUA-ASCII)'
Post processor engine: 4.5748.0
Configuration path: C:\Users\Public\Documents\Autodesk\Inventor CAM\Posts\fanuc turning.cps
Include paths: C:\Users\Public\Documents\Autodesk\Inventor CAM\Posts
Configuration modification date: Thursday, May 26, 2022 3:53:38 AM
Output path: F:\AULA\CAM\LIVROS\INVENTOR CAM\2805.nc
Checksum of intermediate NC data: 12878a23f184cb7ea358e4a6f5c0a010
Checksum of configuration: 2ed50ddae8b83b3cfc53ba70ca6ef449
Vendor url: https://www.fanuc.com
Legal: Copyright (C) 2012-2022 by Autodesk, Inc.
Generated by: Inventor CAM Ultimate 9.0.0.24791
...
Error: Invalid machine configuration in toolpath.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Failed to execute configuration.
Stop time: Thursday, May 26, 2022 6:05:59 PM
Post processing failed.

 

 

I updated the post processors and the error persists.
If in Setup> Select I change to Generic Mill-Turn Lathe and then configure the Post Processing in Edit>Machine Configuration for fanuc turning.cps, the error does not occur, however, when generating the NC program it is generated with a milling tool in Autodesk HSM. See the figure below.
And all tools configured for turning disappear.

 

domingosf_1-1653591863423.png

 

Other pos processors also fail. Tried Hass and Mazak.

Is there any configuration that needs to be done so that these errors and failures do not occur?

Thank you very much in advance.

Domingos

 

 

0 Likes