How to use the Stepper Motor Driver and Stepper Motor blocks together to implement a controlled permanent magnet stepper motor. The model provides two controller options: one to control position and one to control speed. To change the controller type, right-click on the Controller block, select Variant->Override using-> and select Position or Speed.