MASSO supports Sub-Program Call using M98 & M99 codes. Subprograms with upto 5 levels of nesting is supported, with this feature sub programs can be called from the main program without the need to rewrite the same program again and again.
When a sub program is called, MASSO looks for a separate ".nc" file and runs that as a sub-program. Having a separate file approach means that programs that have common features can now be used used with other programs.
P Value - The P value is used to define the sub program file name.
L Value - The L value can be used to run the sub program multiple times.
N10 M98 P10 L5
The above program will look for the 10.nc file as set by the P value and will run it 5 times as set by L value.
NOTE: If the 10.nc file is not found an error message on the screen is displayed and program goes into feedhold. When a program is loaded from F6 screen, MASSO checks that all sub-program files are on the USB and if a file is missing an error is shown to the user
M99 command is used to End Sub-Program or Return back to the main program.
When the above line is found in a sub program file, the control returns back to the main program.