A template is an ASCII file containing a tape code sequence. A sample template is STARTUP: (Not shown in the default LATHE file. This is an example only.)
G92X{X_g92}Z{Z_g92}
G90G00ZT{Tool_num}M6
G43Z{Initial_z}
S{Speed} {Spindle}
Each line of the template is tape code for the machine control.
Variables are separated by braces { }.
A variable will be formatted based on the letter address directly in front of the braces.
String variables must have a space preceding the braces.
If a command word is specified it will be output, repeated values will not be checked.
Templates may have question files to prompt the user for the variables used in the template.
if ** is placed as the first two characters of the template line no sequence number will be output with that line.
if *O* is placed first the sequence number will be output with an O block.
if */N* is placed first the sequence number will be output with an /N block.
for example, the template:
*/N*G92X{X_g92}Z{Z_g92}
*O*G90G00T{Tool_num}M6
**G43Z{Initial_z}
**S{Speed} {Spindle}
will output:
/N001G92X____Z____
O002G90G00T____M6
G43Z_____
S_____M3