There are 2 types of Format Statements. The older format
starts with the letters "fs".    The newer format (V8 & up)
starts with  "fs2".  This type allows you to define the format
for both inch & metric numbers, at the same time.

This is a typical format statement.
fs  1  0.4        #Decimal, absolute, 4 place
We'll break this down into  sections and explain their functions.
fs     :  This is telling the post we're creating a format definition.
     :  This is the number used to identify which format we're using.
0.4   :  This is how the number should look. It can have  0 (zero)
digits to the left of the decimal point. Then the character used for
the decimal point is a "point" ( . ), (more on this in a second).
And up to 4 digits to the right of the decimal point.  This might be
used for a typical axis move like   X.125 or X 8.3125.

More on the "point" ( . ).   Not all machines use decimal points.
many early cnc controls "counted spaces" to determine the value of the number.   X1250  and  X83125 would be the same numbers expressed
without a decimal point. For that you would have this format statement...
fs  1  0 4t   #Decimal, absolute, 4 place,force trailing digits, no decimal point

In europe they use the comma instead of a decimal point.
The format statement for X,1250  and  X8,3125 would look like this.
fs  1  0,4   #Decimal, absolute, 4 place

Below are come of the typical format statements you might find
in a postprocessor. If a combination is not present, you can
add it to the list. Just use a new identifing number (see below).

# --------------------------------------------------------------------------
# Format statements - n=nonmodal, l=leading, t=trailing, i=inc, d=delta
# --------------------------------------------------------------------------
#Default english position format statements
fs  1  0.4        #Decimal, absolute, 4 place
fs  2  0.4t       #Decimal, absolute, 4 place, force training digits
fs  3  0.4d       #Decimal, absolute, 2 place, Delta
#Common format statements
fs  4  1 0         #Integer, not leading
fs  5  2 0l        #Integer, force two leading
fs  6  3 0l        #Integer, force three leading
fs  7  4 0l        #Integer, force four leading
fs  8  0 4t        #No decimal, absolute, four trailing

Example: I need to output an angle move, that must be a
maximium of 3 trailing digits.  I could add.....

fs  9  0.3    #Decimal, absolute, 3 place

Now I can use format statement number 9 for my B axis moves.



New Style Format Statements (fs2) are similar except they
contain 2 sets of formats. The first set is for an inch number
and the second set is for a metric number.

# --------------------------------------------------------------------------
# Format statements - n=nonmodal, l=leading, t=trailing, i=inc, d=delta
# --------------------------------------------------------------------------
#Default english/metric position format statements
fs2  1     0.7   0.6     #Decimal, absolute, 7 place, default for initialize (:)
fs2  2     0.4   0.3     #Decimal, absolute, 4/3 place
fs2  3     0.4   0.3d    #Decimal, delta, 4/3 place
#Common format statements
fs2  4     1 0   1 0     #Integer, not leading
fs2  5     2 0   2 0l    #Integer, force two leading
fs2  6     3 0   3 0l    #Integer, force three leading
fs2  7     4 0   4 0l    #Integer, force four leading
fs2  9     0.1   0.1     #Decimal, absolute, 1 place
fs2  10   0.2   0.2     #Decimal, absolute, 2 place
fs2  11   0.3   0.3     #Decimal, absolute, 3 place
 

Press the "Back" button on your browser to continue.