Output Format

The NC output format is configured in the "output_format" ASCII file.


/usr/weber/post_formats/post_name/output_format

The NC output format is based on the letter addresses present in most NC machines.

A sample word address format list for a Lathe is:

Block number: letter= N format= 4   leading
Preparatory codes: letter= G format= 2 modal multiple leading
Feed word: letter= F format= 4.4/5.4 modal decimal
Miscellaneous codes: letter= M format= 2 modal multiple  
Tool word: letter= T format= 4 modal leading
Peck word: letter= Q format= 4.4/5.3 modal decimal
Dwell word: letter= P format= 5.3/5.3 modal decimal
Speed word: letter= S format= 8 modal decimal
X word: letter= X format= 4.4/5.3 modal decimal
Y word: letter= Y format= 4.4/5.3 modal decimal
Z word: letter= Z format= 4.4/5.3 modal decimal
I word: letter= I format= 4.4/5.3 modal decimal
J word: letter= J format= 4.4/5.3 modal decimal
K word: letter= K format= 4.4/5.3 modal decimal
R word: letter= R format= 4.4/5.3 modal decimal
A word: letter= A format= 4.4/5.3 modal decimal
B word: letter= B format= 4.4/5.3 modal decimal
C word: letter= C format= 4.4/5.3 modal decimal
U word: letter= U format= 4.4/5.3 modal decimal
V word: letter= V format= 4.4/5.3 modal decimal
W word: letter= W format= 4.4/5.3 modal decimal
L word: letter= L format= 4 modal decimal
P word: letter= P format= 1 modal  

Param0: letter=p map=P format= 5 modal decimal
Param1: letter=a map=A format= 4.4/5.3 modal decimal
Param2: letter=b map=B format= 4.4/5.3 modal decimal
Param3: letter=c map=C format= 4.4/5.3 modal decimal
Param4: letter=d map=D format= 4.4/5.3 modal decimal
Param5: letter=e map=E format= 4.4/5.3 modal decimal
Param6: letter=f map=F format= 4.4/5.3 modal decimal
Param7: letter=g map=G format= 4.4/5.3 modal decimal
Param8: letter=h map=H format= 4.4/5.3 modal decimal
Param9: letter=i map=I format= 4.4/5.3 modal decimal
   .          
   .          
   .          
Param25: letter=z map=Z format= 4.4/5.3 modal decimal

Each letter address has its own entry line. Some letter addresses are given common names. The common names are fixed and correspond to the functions on a standard machine. Standard is defined as a Lathe.

Each capital letter is reserved its own word address. In addition ten additional parameter words are reserved to handle extra parameters in control macro calls.

Now lets explain the entries for the x word:


X word: letter= X format= 4.4/5.3 modal decimal

letter= X the letter address output for x
map=X the letter address output for x, remaps the letter address to a different letter address
format= 4.4/5.3 the inch/metric format specification, e.g.,
4.4 = 4 places before decimal, 4 places after the decimal;
5.3 = 5 places before decimal, 3 places after the decimal
modal the inch/metric format specification, e.g., means that the x words are modal and do not need to be output when repeated
decimal the inch/metric format specification, e.g., output is in decimal format, e.g., X- 25.34
Instead of decimal we could have:
leading Leading zeros, for example X-002534
trailing Trailing zeros, for example X-253400

In addition to the output format the following commands may appear at the end of a line:
plus Forces the output of + signs, i,e., X+25.34, X+253400
invert Changes the sign from + to - and vice versa.    All x values will be reversed in sign.
pt_zero Forces " X5.0 " instead of just " X5. "
no_pt: Forces " X5 " instead of just " X5. "
zero_pt Forces " X0.5 " instead of just " X.5 "
full_field Forces full field X002.0000, or X0020000

For example:


X word: letter= X format= 4.4/5.3 modal trailing plus invert


will output


X= 3.25 as X -32500


and


X= -.375 as X +3750


and


X word: letter= X format= 4.4/5.3 modal decimal zero_pt


will output


X= .352 as X0.352


Each letter address has a System Variable associated with it.
The associations are as follows:


Feed word --> Feed
Tool word --> Tcode --> ASSIGN : Tool_num = Tcode
Peck word --> Peck
Dwell word --> Dwell
Speed word --> Speed
X word --> X
Y word --> Y
Z word --> Z
(etc)


A letter may only appear once on the list.    By changing the letter it is possible to reassign the System Variables to different word addresses.    For example, if on your machine the dwell is specified by a Q letter address; change the letter on the dwell word to Q.    Like this:

Dwell word: letter= Q format= 5.3/5.3 modal decimal

The letter Q cannot then be used elsewhere.

Only a single character may be specified for the letter address.    On an NC control which requires multi-character address words we can map a letter into a character sequence.    For example, on a GE-2000 control the dwell is specified by including P3= 0.5 in the canned cycle block.    To accomplish this with TurboPost map the P into P3= .    Like this:

Dwell word: letter= P map= P3= format= 5.3/5.3 modal decimal

The command map= will map the P letter into the character sequence P3=.