Hi everyone,
Trying to figure out how to do the whole "setup A axis as a spindle and use swapaxis back and forth" thing with a stepper. Been searching for days...
The first thing that confuses me is the wiring/setup, I have my 4th axis stepper wired up and can rotate it via g-code, hotkey, etc. But I cannot get it to act as a spindle. M3 S********* in the MDI code line does nothing.
In Mach, I have set up the A axis as pins 8 and 9. I changed the spindle pins to 8 and 9 as well. I used a simple g-code to confirm X,Y,Z,A movements. I then added the macros posted by another user here to call and reset the swapaxis functions of Mach 3.
I also added M3 S********* to the code and I see the spindle rpms (on screen) ramp up and then immediately back to 0, can't figure out how to keep it spinning for a longer duration. Also, at the end of the code, if I have an A movement command after the swapaxis has re-set, my Z axis moves. However, it moves according to the A axis commands and the 4th axis DRO numbers move with it. I checked in ports and pins and saw my spindle numbers were now 6 and 7, same as the Z axis...

I have a Gecko G540, Mach 3 Version R3.042.033, X3 deluxe CNC setup.
My config based on my searches here.
Toolpath Configuration
Axis of rotation=X, A-Rotations Enabled box and Use Radius for Feedrate is checked
Spindle Setup
Use spindle motor output box is checked
step/dir motor box is checked
General Config
A is angular box is checked
Rotational section, no boxes checked
A question for the future once this is all figured out...how can I physically bring the spindle's step/dir signals out of the G540 so I can route it to a separate board? The G540 has the VFD outputs, but I'm not sure that's what I want to use?
Thanks!