Within a generator, mechanical Torque placed on the shaft maintains the movement from the armature winding from the stationary magnetic industry, inducing a present during the winding. In both of those the motor and generator scenario, the commutator periodically reverses the direction of current circulation in the winding so the circuit outside th