1. Apparatus for generating a motion control algorithm for the control of an AC electric machine, the apparatus comprising: a motion control engine comprising: a motion control sequencer; a motion control program memory; a port memory; a plurality of motion control modules; and a plurality of motion peripheral modules; the motion control sequencer executing a sequence of instructions stored in the motion control program memory directing the sequencer to execute selected one of the motion control modules and motion peripheral modules in a specified sequence and with a specified connection of module inputs and module outputs and operational parameters stored in the port memory to generate the motion control algorithm.