Comments on the standard Denford post file:
_________________________________________________

any numbers in here are in mm - whether a metric machine or not

; the Options section:
_______________________
[Options]
Comment=Milling
; this comment appears in the post selection drop down after the files' name

File Extension=fnc
; simply the file extension given to the created file

Line Numbers=False
Line Number Start=10
Line Number Step=10
Line Number Char=N
; Line numbering options (not normally used)

Comment Char={40}
; tells post what character is used to denote comment lines
; this could be entered as ( or {40} which signifies use ASCII character number 40 which is a (
Add Comments=YES
; output comments to the file or not

Inch Mode=No
; will output the file in metric or inch units, and also output the correct G code from the next two options
Metric Code=G21
Inch Code=G20

[Axes]
Number of axes=3
Axis Letter0=X
Axis Letter1=Y
Axis Letter2=Z
; self explanatory ?

Modal Positions=True
; in other words, should the post output every axis position on each move, whether changed or not

Axis Seperator={32}
; the character(s) which seperate each axis position (32 is the space character)
Safe2=2
; sets the safe position for axis 2 (the Z axis) - other axes will default to 0 - but are not used by the post outputs anyway 


[Linear Moves]
Rapid=G00 {POSITION}
; format for a fast (rapid) move - something MUST be entered for this even if machine does not allow rapid commands

Initial Feed=G01 {POSITION} F{FEEDRATE}
; the format for the very first feed move
; note that the words inside {} are constants used by the post, see further on for a list of these expressions

Initial Feed No Feed=G01 {POSITION}
;the format for the next feed move after a toolchange or rapid move - if not specified will be the same as Initial Feed setting above

Feed={POSITION}
; the format for any feed moves after a change in feed has occured - if feedrate is not modal, then you should enter something like: {POSITION} F{FEEDRATE}

[Arc Moves]
Expand Arcs=False
Arc Step Size=0.1
Min Arc Radius=0.2
; these parameters are to do with outputting arcs as a series of short linear moves

Plane Switching=True
Plane01 Code=G17
Plane02 Code=G18
Plane12 Code=G19
;if plane switching is not available on the machine, then any arcs in different planes will be expanded into short moves by the post processor


Centre Letter0=I
Centre Letter1=J
Centre Letter2=K
Radius Letter=R
Output Centre=True
; if true, then the post will output circle centres using the Centre Letter definitions (eg IJK),
; if false , then the post will output the circle radius using the Radius Letter (eg R)
Absolute Centre=False
; if this is true then centre positions will be output as absolute positions, not incremental
; eg - X100 Y100 I50 J0 in incremental is the same as X100 Y100 I150 J100 in absolute mode
Single Quadrant Arcs=False
;if you set this true, then the post will split arcs into quadrants 0,90,180 and 270 degs.
;so a full circle will actually output 4 seperate 90 deg arcs



CW Move=G2 {POSITION} {CENTREPOSITION}
CCW Move=G3 {POSITION} {CENTREPOSITION}
Initial CW Move=G2 {POSITION} {CENTREPOSITION} F{FEEDRATE}
Initial CW Move No Feed=G2 {POSITION} {CENTREPOSITION}
Initial CCW Move=G3 {POSITION} {CENTREPOSITION} F{FEEDRATE}
Initial CCW Move No Feed=G3 {POSITION} {CENTREPOSITION}
; defines how circular movements are output


[Header]
{MMINCHCODE}
G90
{40}Denford Post Output - {APPLICATION}
{40}Date: {DATE}
{40}Time: {TIME}
{40}Source File: {SOURCEFILE}
{91}BILLET X{BILLET0} Y{BILLET1} Z{BILLET2}
{91}EDGEMOVE X0 Y0
G91 G28 X0 Y0 Z0 M05
; this whole block of strings will be filled in and output by the post processor at the START of the output file


[Footer]
G00 Z{safe2}
G91 G28 X0 Y0 Z0 M05
G90
M30
; this whole block of strings will be filled in and output by the post processor at the END of the output file


[Tool Change]
{91}TOOLDEF T{TOOL} D{TOOLDIAM}
;G90 G00 Z{SAFE2}
;G91 G28 X0 Y0 Z0 M05
G90 M6 T{TOOL}
M03 S{SPINDLERPM}
; these strings will be output whenever a tool change is required by the CAM program


[Scaling]
Axis0=1
Axis1=1
Axis2=1
Spindle=1
Feedrate=1
; each axis, spindle and feed command can be scaled to suit a particular machine


[Format Strings]
Tool=%0:0.2d%0:0.2d
Axis0=%1.3f
Feedrate=%1.1f
Spindle=%1.0f
; sepcifies how numbers are output - see the next section for more details on number formats



Number format strings:
_____________________________

In simple terms, each data formatting substring starts with a % and ends with a data type indicator :

d 	= Decimal (integer)
e 	= Scientific
f 	= Fixed
g 	= General
m 	= Money
n 	= Number (floating)
p 	= Pointer
s 	= String
u 	= Unsigned decimal
x 	= Hexadecimal
The general format of each formatting substring is as follows: 
%[Index:][-][Width][.Precision]Type 
where the square brackets refer to optional parameters, and the : . - characters are literals, the first 2 of which are used to identify two of the optional arguments. 

Eg,
%.3d with 7 gives: 007 (or %0.3d may look more readable)

%1.4f with 12.45 gives 12.4500

N%0.4d with 12 gives N0012

%-5d with 12 gives 12_ _ _ Ie, puts padding to the right hand of number
%5d will give _ _ _12       (where _ is a space character)

T%0:0.2d%0:0.2d will give T0303 with  the value 3 
 because the index is given by 0: then it uses the first number each time



Constant expressions
______________________


'POSITION' - the post will fill this in with the current axis positions

'CENTREPOSITION' - will be changed to read the centre position of an arc move

'TOOL' - will be changed to read the current tool number

'SPINDLERPM' - will be changed to read the current spindle speed in RPM

'FEEDRATE' - will be changed to read the current feedrate value

'BILLET0' - will be changed to read the current billet size for axis 0 - same for all other axes

'SAFE0' - will be filled in with the current safe height for that axis (0) - may be overwritten by the CAM software

'DATE' - the current date will be filled in here

'TIME' _ the current time will be filled in here

'APPLICATION' - will enter the name of the CAM application that is outputting via the post processor

'SOURCEFILE' - will enter the original filename used by the CAM application (eg, dxf,stl etc..)

'MMINCHCODE' - will substitute the previously defined code for inch or metric mode - depending upon whether the post is in inch or metric mode

'TOOLDIAM' - will enter the diameter of the current tool

'LINENUM' - will enter the current linenumber string

'FIRSTAXISLETTER' - put in the first axis letter of the current move, eg if the move is to be G01 Z100 Y20 F350, then FIRSTAXISLETTER will insert 'Z'




