Mill preflight

Looking for someone that has written a preflight. Something like a spindle warmup, spindle encoder verify, jog the table around and move the z axis up down while the oiler is oiling routine. Basically all the things that I have to do every morning but in one.
I ask this because I recently had my spindle encoder go out of alignment and when I tried to run a taping cycle and it sheared all the teeth off (1100mx, low belt, 1/2” 13 hss tap). I didn’t know the encoder wasn’t working so the taping cycle didn’t try to reverse at the bottom of the hole. Anyway it’s fixed now but I have added the D min encoder test to my morning routine. Trouble is it reboots the controller after the test is done.

I’m not aware of anyway to run the spindle encoder test without using the ADMIN command which would then force a reboot. The other issue is the oiler will start to run as soon as the machine has power and will finish long before the GUI is even loaded, let alone still be running while a program is going. To make that work, you’d have to manually power up the oiler at the appropriate time or use an IO module to power it up.

Having said all that, I’m not in front of my machine so I don’t have access to it but I’ve got a spindle warmup program that I run every day before I do anything else with my machine. I also have a program that warms up the spindle while jogging the table around but I’ve mostly stopped using that one as I don’t feel it really provides any significant benefit. I’ll try to remember to grab both of those next time I’m in front of the machine and post them up for you unless someone else beats me to it.

1 Like

Two files attached.

Machine_Warmup will run the spindle and all three axis motors. The start of the program is important as it determines what the body of the program will actually do. The parameters you can change based on your machine setup are:

numCycles - number of program “steps”. Each step will increment the rpm and feed rate by max/numCycles
maxRPM - maximum RPM you want the spindle to run at
maxFeed - maximum Feed rate FOR ALL THREE AXIS
maxX/maxY/maxZ - the furthest distance you want each axis to move from G53 0. Be mindful of any fixtures or other things on your table, especially when setting maxZ
interval - amount of time in seconds for each feed/speed step in the program
Leave everything else alone.

Spindle_Warmup is much simpler. It only runs the spindle, no table movement. The speeds and timing are all hardcoded. The final move at the end positions the spindle properly in preparation to reference the ETS. Adjust this position (in G53) according to your needs.

Machine_Warmup.nc (1.3 KB)
Spindle_Warmup.nc (286 Bytes)