Motors are universal in whatever happens in science or the real world. They are used everywhere there is a motion required. There are various kinds of motors :
Servo motor: This is a brushless motor
Stepper motor
Induction motor
Motors used to be dumb rotating machines but as the technology has developed, the motors have become more advanced that can be precisely controlled. The technology has advanced such that the location of the position of the motor can now just be controlled by the computer by sending a command. This used to require a PLC (programmable logic controller) that controlled the motor but moving forward a company called animatics (now acquired by MOOG) invented motors that are completely controlled by a computer. The commands that are sent to the motor are short segments of code that make sense in English and make the making of program for the motor so easy.
Here is a segment of the code that can be used to control the motor that is abstracted from the animatics user manual.
EIGN(2) ‘Disable Left Limit
EIGN(3) ‘Disable Right Limit
ZS ‘Reset errors
ADT=100 ‘Set Target Acceleration
VT=100000 ‘Set Target Velocity
PT=300000 ‘Set Target Position
G ‘Go, Starts the move
TWAIT ‘Wait for move to complete
PT=0 ‘Set buffered move back to home
G ‘Start motion
END ‘End program
Consider how simple that makes making things. Typically, this used to require multiple computers, controllers, power supplies but using smart motors makes this simple. You just enter a command through the program (Visual basic, C++, as two examples) and it controls the motor. Look up the company’s website to get more information.