MACHIN/FANUCM        $$ The MACHIN statement must the the first statement in the program file.
TMARK       $$ Optional.  If used it must go before anything that writes to the tape.
PARTNO N/C 360 APT SAMPLE PART PROGRAM
SEQNO/1000,INCR,10,1234    $$ Start at 1000, increment 10, program identifier O1234
PRINT/ON    $$ This controls the printing of canon data after each geometric definition.
CLPRNT      $$ This controls the printing of section 3 data. Options are "ON", "OFF", AND "OPTION".

$$CANON/ON  $$ Allows the redefinition of geometric definitions.
CANON/OFF   $$ Does not allow the redefiniion of geometric definitions (default).

SYN/ AA,ATANGL, CA,CANON,  CE,CENTER, CI,CIRCLE, CY,CYLNDR, DC,DNTCUT, $
     FR,FEDRAT, GB,GOBACK, GD,GODLTA, GF,GOFWD,  GL,GOLFT,  GR,GORGT,  $
     GT,GOTO,   IP,INDIRP, IV,INDIRV, IO,INTOF,  LF,LEFT,   LI,LINE,   $
     MX,MATRIX, OB,OBTAIN, PA,PARLEL, PD,PENDWN, PU,PENUP,  PP,PERPTO, $
     PL,PLANE,  PT,POINT,  RA,RADIUS, RP,RAPID,  RT,RIGHT,  TT,TANTO,  $
     TH,THICK,  
TA,TLAXIS, TL,TLLFT,  TN,TLON,   TR,TLRGT,  VE,VECTOR, $
     XL,XLARGE, 
XS,XSMALL, YL,YLARGE, YS,YSMALL, ZL,ZLARGE, ZS,ZSMALL

$$ The single SYN statement above may also be split into mutiple statements as below:
$$ SYN/ AA,ATANGL, CA,CANON,  CE,CENTER, CI,CIRCLE, CY,CYLNDR, DC,DNTCUT
$$ SYN/ FR,FEDRAT, GB,GOBACK, GD,GODLTA, GF,GOFWD,  GL,GOLFT,  GR,GORGT
$$ SYN/ GT,GOTO,   IP,INDIRP, IV,INDIRV, IO,INTOF,  LF,LEFT,   LI,LINE
$$ SYN/ MX,MATRIX, OB,OBTAIN, PA,PARLEL, PD,PENDWN, PU,PENUP,  PP,PERPTO
$$ SYN/ PL,PLANE,  PT,POINT,  RA,RADIUS, RP,RAPID,  RT,RIGHT,  TT,TANTO
$$ SYN/ TH,THICK
,  TA,TLAXIS, TL,TLLFT,  TN,TLON,   TR,TLRGT,  VE,VECTOR
$$ SYN/ XL,XLARGE
XS,XSMALL, YL,YLARGE, YS,YSMALL, ZL,ZLARGE, ZS,ZSMALL

$$ These definitions are most likely used in every program.
HOME=PT/10,10,10
P0=PT/0,0,0
LX=LI/XAXIS
LY=LI/YAXIS
PL0=PL/0,0,1,0
PL1=PL/0,0,1,1
CPL=PL/0,0,1,3
CLEARP/CPL    $$ plane used with RETRCT

SPAT=PATERN/RANDOM,P1,P2,P3,P4   $$ sample pattern def for the drill example

$$ ********** standard start up commands for a new tool **********
PPRINT
PPRINT TOOL AND OPERATION DESCRIPTION
RESET       $$ Outputs the safe startup string in the options file.
LOADTL/n[,h[,d]]    $$ Or TURRET/n[,n] for a lathe.  For a mill the tool height offset G43/G44
                    $$ will be output after the first block that contains an X or Y command
                    $$ if "SplitToolHeightComp" in the options file is true.

TOOLNO/n    $$ Position next tool in the tool carousel (mill).

MODE/90     $$ Use mode 90/91 as needed.  It's probably already in your safe startup option.
            $$ If used it should probably be positioned after LOADTL (see its comment).


$$ The following is optional if not using G92.  It only needs to be called
$$ once if the value doesn't need to change.  By default it will be output
$$ on the next block that contains an X or Y command.
ORIGIN/n

FROM/HOME
CUTTER/.5
RP,GO/PAST,LX,ON,PL1,PAST,LY    $$ Position to above part.  For a mill the Z command
                                $$ will be output on the next block if option
                                $$ "SplitToolHeightComp" is true.

COOLNT/ON   $$ By default this will be output on the next block that contains a Z command
            $$ which may limit how much coolant gets splashed on you.

SPINDL/5000,RPM,CLW     $$ Placing this here ensures that the spindle does not turn on
                        $$ until just above the part surface (mill).

FEDRAT/20.3
NOPS,GO/ON,PL0
AUTOPS
CUTTER/.25

$$ The following causes all the scalar and surface variables currently defined
$$ to be printed.  It is placed here as a reminder of how to do that.
PRINT/3,ALL


$$ ********** start up, drill example **********
PPRINT
PPRINT #7 (.201) DRILL .433 DEEP
LOADTL/2
TOOLNO/3
MODE/90     $$ if needed
ORIGIN/n    $$ optional if not using G92; see comment above
FROM/HOME
RP,GO/ON,(LI/P1,AA,0),ON,PL1,ON,(LI/P1,AA,90) $$ 1st point in pattern to be drilled (or GOTO/x,y,z)
COOLNT/ON
SPINDL/5000,RPM,CLW
CYCLE/DRILL,-.433,.1,5
GOTO/SPAT
CYCLE/OFF

$$ ********** standard shut down commands **********
RETRCT  $$ retracts to CLEARP; may optionally use CLRSRF/NOW (see documentation)
COOLNT/OFF
SPINDL/OFF
RP,GOHOME

$$ STOP outputs M00
$$ OPSTOP outputs M01
$$ END outputs the value of the "end" property in postp_options.txt
$$ REWIND outputs the value of the "rewind" property in postp_options.txt
STOP or OPSTOP or END or REWIND

TMARK   $$ Optional.
FINI