I'm new to g-code, so apologies in advance if this is a dumb question:
I'm trying to improve my machine warmup program. Currently it just ramps up & down the spindle a few times. I'd like to give the lube system a pump & run the axises across their extents a few times as a part of the warmup routine. My machine (AlphaCNC AMN-6040-M) has home sensors, and it works just how I want to when I hit the REF ALL HOME button in Mach-3. I'd like to automate the same thing in g-code. When I execute G28.1 X0 Y0 Z0 a few strange unexpected & potentially bad things happen:
1. The machine appears to G00 move to the relative (work) home 0 0 0 position. Then moves to absolute-0 0 0, touching the limit switches like I want. But then it G00's back to relative-home & absolute-home, over and over stuck in a loop. I watched it go thru this cycle four times before I aborted it. The g-code execution never moves past that G28.1 line while doing this.
2. After this, if I unload the g-code file, edit it & re-open it, Mach-3 throws up a dialog box that it's calculating the move (don't recall exact wording) and never finishes. I need to click the cancel button to get it to close. At this point I usually have to exit & restart Mach-3 to get things working normally again.
Am I doing something wrong?
I'd like to index the Z-axis up to it's absolute-0 / limit switch (to clear anything on the table) then absolute-x0 y0. My machine is a 6040 set in metric, so I'd like to G00 to absolute x600 y600 (or close to 600) then z300-ish (enough to clear any tool installed). Do this a few times while ramping up spindle speed to max.
Can anyone suggest how to accomplish this? I'm skimming posts on startup routines but haven't seen what I'm looking for. Am I missing something good?
FYI the PC running Mach-3 is connected to a WiXHC MKX-V controller via USB. Motors are servos not steppers. Setup is mostly as-configured from the factory.