9.5 LABORATORY - STEPPER MOTOR CONTROLLER
A stepper motor is unlike other motors. When a voltage is applied the motor does not turn continuously, it only moves a small increment. There are normally a set of four or more inputs. When these are turned on-off in a set pattern the motor shaft will rotate forward or backwards. A typical stepper motor might have 200 steps per revolution, or steps of 1.8 degrees. These motors often require somewhat sophisticated controllers. One type of controller is called an indexer. It can be given commands to move the motor, and then it takes care of pulsing the motor outputs to drive the motion.
The stepper motor controllers to be used in this laboratory are integrated into the turntables in the material handling system. The controller is integrated into the turntable stations so that it can rotate the turntable up to 360 degrees with a stepped motor, eject a cart using two outputs to solenoid valves, and detect a cart present with a diffuse photoelectric sensor. The controller has an RS-422 port that can be used to communicate, and load programs. This will be connected to an RS-232C port using a special interface cable that converts the current loop to voltage values. The communication settings for the turntables are 9600 baud, 8 data bits, no parity, 1 stop bits, no flow control.
When writing programs command lines can be up to 15 characters long, including spaces. Spaces are used to separate commands and arguments. Characters used in programs can be either upper or lower case. A sample program is given below.
1. Go to the web site www.stepcontrol.com and look at the product documents for the DCB-241 stepper driver.
1. Use a terminal program to communicate with the stepper motor controller. You will need a special communication cable, and the boxes can be opened with a flat bladed screwdriver. Plug the communication cable into the lower connector. (Note: if the unit already has power don't touch the exposed 120Vac power on the power supply.) Connect an air supply and power to the unit. (Note: don't forget to turn on the power on the front of the cabinet.)
2. Use the following commands (in sequence) to verify that the turntable is operating properly, and to explore basic commands. (Note: comments are provided for understanding, but should not be entered into the controller.)
3. Enter the following program so that the turntable operates automatically. The list below also includes the commands to download and enter the program. Again comments should not be entered, and line numbers are automatically generated. When the program has been entered it can be run with the command 'G0'.
18 J 4 3 -- jump to address '4' four (3+1) times, a basic for loop (you may need to change '4' if your line numbers don't match)
Search for More: |
Custom Search
|   |