You need to configure an A axis in Mach and it should be rotary.
If hand coding, ie; G00 A 180 would rotate the A 180 degrees and at a set federate, G01 A 180 F1 would rotate the axis at a feed rate.
Read the Mach manual for all that applies to a rotary axis.
If not hand coding, you need CAM software to generate the code for use by Mach.
RICH