Hi guys

I built a CNC quilting machine for the wife and I'd like to replace the sewing machine motor with a stepper motor. The reason for this is I can control the speed better and run it at a lot lower speed.
My break out board is 4 axis and I only use 2, X & Y. I know how to wire it up etc but not sure about gcode. If I issue a command to the Z axis which will be my motor, all other commands wait till this has been executed, right. So I should use the A axis? f so what would the code lines be to turn it on at the start of the cycle and off once all other commands have been completed?

Thanks