How does ConfigPost work?
After customizing a Post file for your CNC, you can generate a part program to machine any part using the Generate NC Program command in PartMaker’s Job Optimizer menu. The data in the Process Table you create in PartMaker is converted into an NC program according to the format information in the Post file.
This image shows how a Post file you create in ConfigPost and a Process Table you create in PartMaker are used together to create a final part program for your CNC machine.
A Post file created in ConfigPost is used by PartMaker as a template to format the Process Table you create in PartMaker. This template consists of program formats, such as Program Start, Linear Move, and Tool Change, which determine the appearance of a part program for a specific CNC.
Each program format uses letter address characters such as X and Y and reserved words such as <x-coord>
and <y-coord>
to indicate the sequence of data in each program format block. These letter address characters and reserved words determine how a Process Table is converted into a CNC part program.
Program formats are filled when PartMaker generates an NC program. Reserved words in the Post file are substituted by their corresponding values and machine tool codes (called G and M codes) from the Process Table. The resulting part program is a text file that you can send to your CNC machine to machine a part.
Look at this sample data of a tool that will make two moves:
Linear Move to X=2.5 in Y=1.5 in Z=-0.5 in Feedrate=10 in/min
Linear Move to X=3.5 in Y=1.5 in Z=-0.5 in Feedrate=10 in/min
The final part program for these two moves would look like this:
N25G1X2.5Y1.5Z-0.5F10.0
N30G1X3.5Y1.5Z-0.5F10.0
Most CNC machines use a concept of modality to avoid redundant data in a part program. The same coordinates and/or commands do not need to be repeated in the part program. For such machines, redundant moves as in the previous example can be reduced to the following:
N25G1X2.5Y1.5Z-0.5F10
N30X3.5
In order to facilitate the output shown in the previous example, the Linear Move Format you specify in ConfigPost would look like:
{N <seq>}{<motion>}{X <x-coord>} {Y <y-coord>} {Z <z-coord>} {F <feed-upm>} <eob>
The table below shows how PartMaker extracts all coordinate data from the Process Table and the format of the line from the Post file, then the corresponding values are substituted to generate each line in the resulting part program.
{N <seq>} |
{<motion>} |
{X <x-coord>} |
{Y <y-coord>} |
{Z <z-coord>} |
{F <feed-upm>} |
<eob> |
---|---|---|---|---|---|---|
N 25 | G1 | X 2.5 | Y 1.5 | Z -0.5 | F 10.0 | <CR> |
As shown in the table, you enter letter address characters N, X, Y, and Z as literals in each program format block of a Post file; they appear in the final part program file exactly as they appear in the program format block. Reserved words such as <seq>
and <motion>
identify the placement of corresponding values or strings in each program format block.
<eob>
.Program formats determine the structure of a part program for a specific CNC machine as shown in the previous illustration, the example of a linear move format. For each process in a Process Table PartMaker converts program formats into lines of text by replacing reserved words with their corresponding values from the Process Table.
- In the table,
<x-coord>
,<y-coord>
, and<z-coord>
are numeric reserved words that represent X, Y, and Z axis coordinates. <motion>
is a string reserved word representing a type of motion (Rapid or Linear for example).<feed-upm>
is a numeric reserved word representing the feed rate value in Units Per Revolution (UPM) for the line of code in the part program.<eob>
is a string reserved word representing the end of a block (line) of code in a part program.- The brackets
{ }
are used as modality delimiters in program formats.
Using modality reduces the overall length of a part program - repeated coordinates and/or commands are automatically stripped from the final part program to prevent repetition of a reserved word whose value is the same as the previous occurrence of that word.
{<seq>}
reserved word, PartMaker will strip all sequence numbers from the part program during program generation. This is accomplished by specifying 0 for the "Block Increment" number in PartMaker’s Post Options dialog for PartMaker/Mill, PartMaker/Turn and PartMaker/WireEDM.