A servomotor controller by which a load on a machine device can be reduced, and control capability can be stabilized as well as the resistance property for a temporary blackout or a temporary voltage drop can be more secured in accordance with driving conditions of the machine device and a motor load. The servomotor controller includes: a bus voltage detector for measuring a bus voltage, and a current detector for detecting current passing through a servomotor. A controller 9 switches, depending on the bus voltage, a position control operation with a velocity control operation, to decrease the current supplied to the servomotor in a case where the bus voltage is lower than a first predefined reference voltage.