SwapAxis (?,?) and ResetAxisSwap (?,?) are scripting functions used in a macro. The macro is called in the Gcode. The macro provides the proper scripting to do what you want to accomplish.The ?,? above are integers designating the different axes. Read the Macro Programmers Reference Manual.
A,B,C are rotary axes rotating about the x,Y,Z AXES. A,B,C can be rotary ( degrees ) or linear depending on how they are defined. You can't continously rotate the A,B,C axis in Mach.If the mill spindle is manualy controlled you can still define spindle in motor tuning. Note that XYZABC AND SPINDLE needs to be defined in Ports and Pins and tuned.
So you can swap, say A and Spindle, calling the correctly scripted macro at the proper place in the Gcode. Mach accomplishes this by swapping the pin outs of those axes.
There is more to this just swapping the axes and the proper scripting in a macro / macro's can take care of homing etc or whatever else needs to be done.Additionaly gcode can command the spindle speed.
I am not the sharpest tack / just a novice at programming and have never had a need to use swapping. So that said, unless someone chimes in on more specifics. There are some limitations ie; can only have one axis swap / same axis active at a time, I think?
"YOU" will need to read the thread and associated threads you find by searching swap axis to see what is required.
The above is jest of it all as I remember.
RICH