Post Processor Overview
Every machine has it own language and particularities.
To get the same toolpath on different machines, may be necessary to customize the output g-code.
The customization is obtained editing the post processor.
Basic Concepts
Here some basic concept to understand , in order to customize the post processor.
1) NC Program stages
You can consider the nc-program as a sequence of stages , each stage has it's own template :
G-Code Header
For each operation
Tool Change
Tool Approach
List of movements that make up the toolpath, or in some cases macros (drilling, tapping, etc ..)
Tool disengagement
Operation Finalization
G-Code Footer
For each of these phase it's called a template and a dictionary, from the union of these two elements i get the output g-code.
See below for a pratical example.
2) Templates
Here an example of a template .
Is nothing more of plain text .
Inside this text , you can see some word between curly brackets. These are the TAGS.
{EMPTY_LINE}
{LINE_N}
({OP_DESC})
{RADIUS_COMP_INFO}
({TOOL_LABEL})
T{TOOL_POS}M6
{NEXT_TOOL_POS}
{FEED_MODE}
S{SPEED_VALUE}{SPINDLE_ORIENTATION}
{ORIGIN}
{COOLANT_CODE}
3) Tags Dictionary
The tags are nothing more the variable values, here an example of a tags dictonary.
LINE_N = N5
TOOL_POS = 15
NEXT_TOOL_POS = 10
FEED_MODE = G98
SPEED_VALUE = 2387
SPEED_ORIENTATION = M3
ORIGIN = G54
COOLANT_CODE= M8
And so on.
Where i can find the available tag list ?
4) Output Final Code
From the combination of the single template and the tag dictionary, the output g-code will be created.
N5
(CONTOUR - ROUGHING)
(COMP COMPUTER - RADIUS COR VALUE 10)
(R390 D 20MM)
T15M6
T10
G98
S2387M3
G54
M8
The tag value will replace the {TAG_WORD} in the template.
Dictionary Convention
To facilitate understanding of the parameters available in the dictionary , it's been used a convention for naming tags.
Suffix _CODE :
These tags values are complete with both the char ( F, G, M) and numeric part ( 100, 0.3) .
example :
{FEED_CODE} => F.3
{SPEED_CODE} => S100
Suffix _VALUE :
These tags values contain only the numeric part ( 100, 0.3) .
example:
{FEED_VALUE} => .3
{SPEED_VALUE} => 100