Basically yes.
Your electric motor has a limited span in terms of power and speed. With an inverter running a three phase motor (AC) the motors are designed to be at a constant speed (dependent on the cycles per sec of the power supply (50 in UK 60 in USA). To "fool" it and alter the speed the inverter alters the cycle per sec output. This alters the speed, but also alters the available torque from the motor. This can mean when doing a "big" job on the lathe say something 7" in diameter (alright - not that big) my speed has to come down to between 70 and 200 rpm - depending on the tool. My motor turns the spindle between 0 and 1300 rpm, and down at 200 has hardly any power behind it (despite being twive as large as my original).
You then have to introduce gearing down to get the motor spinning faster - i.e. more power - whilst the job is still turning at the optimum cutting speed. The same applies in reverse - 1300 rpm is not really fast enough for some of the milling jobs I would like to do, so I really should gear it up.
Your gearing table should, therefore have the optimum speeds for that gear set in. They will probably have to overlap to give the best results (or should I say "even" results over a wide range) - my old pulley arrangement had a choice of six "settings" so something similar plus an inverter will give a good range.
You can set the pully directly on the lathe pages, or on the mill pages it is on the settings page.
If you select a speed using GCode using the S command, Mach checks if it can give that speed on the pully shown as selected - and will give a warning if not. There is no code to change the pulley on GCode - since it is a physical action to change the gearing.
Mach quite clearly needs to know what pulley you are on (or which gear you are in) so it can alter the speed of the motor correctly to give the speed requested.
You could, I would imagine, be able to alter the Vis Basic on the S command to check the pulley selected first, and warn you if it could not comply, and stop the machine to allow you to change the gearing. If you were using a CAM program that also selects cutting speeds etc for you, then this would ensure that you were always on top of the job, not just a slave to the machine.