$MPF-FIRST-IN-NC options
Cadfil Help contents Cadfil.com Home
$MPF-FIRST-IN-NC. A standard G-code NC program file (<name>.prg) normally consists of a main program (MPF) and a series of sub-programs (SPFs) this option allows the MPF to be the first program in the prg file ($MPF-FIRST-IN-NC=1) or the last program in the prg file ($MPF-FIRST-IN-NC=0).
There are now further options, if $MPF-FIRST-IN-NC=2 then instead for creating <name>.prg the post processor will create files <name>.mpf and <name>.spf with the MPF and SPF data in them as some controllers require the two types of program to be separate.
With $MPF-FIRST-IN-NC=3 then instead for creating <name>.prg the post processor will create files <name>.mpf and one or more <name>.spf files. Thus every program unit is in a separate file. This mode can be useful for example on Siemens 840 controllers the SPF's can be accessed directly from the hard drive (using EXTCALL) without having to 'load them'.
With $MPF-FIRST-IN-NC=4 as option 3 above this splits the program into individual SPF files. The MPF is also created as an SPF file, this may be helpful if the main program needs to be integrated into a higher level HMI on the CNC.