Hey Dan,
Maybe someone who has a Masso G3 (I don’t) should do that. But I can help you by suggesting you should simply follow the links to Masso Documentation I provided.
a. The pushbutton version is a little more complicated as you will have to deal with cables and screw terminals: The Masso allows attaching simple electric pushbuttons, each to one of 6 available “Autoload G-code input” terminals on the Masso G3 Controller, which is described here with a simple circuit diagram, and then assign a *.ngc g-code program to it, which is described under “Loading gcode file on Input signal going high” on this page. See also this forum page or this page where someone created a control board with buttons. The .ngc program file would contain the code above.
→ You can create a .ngc program with a text editor of your choice (like Notepad), by typing the code I posted above into the text editor and save it as “spindle_warmup.txt” and then rename “spindle_warmup.txt” to “spindle_warmup.ngc”, and voilà, you have g-code file that your machine can execute. You can put it on a USB drive, connect it to the Masso Controller and select the program to execute it.
To let it execute automatically by a specific pushbutton that you attached to the machine, you would have to first rename it to “autoload1.nc” or “autoload6.nc”, depending on which of the six available inputs you assign your button. If it is called this way it is found on the USB pen drive and will be selected by the corresponding button that you connected to the controller.
b. Under “Automatically loading gcode file on power up or when connecting USB pen drive” on the same page of Masso documentation, they say you can also rename your “spindle_warmup.txt” file to “autoload.nc” and put it on a USB pen drive, and it will be executed as soon as you connect the USB stick to the Masso G3. That is the simpliest solution.