ExpB5 - Exp5: Further adventures in LabVIEW programming:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Further adventures in LabVIEW programming: stepper motor control and synchronised data acquisition This afternoon will be an exercise in LabVIEW programming that will again require some concentration and willingness to experiment and learn. In places, the guidelines will be sparse, so you can demonstrate your brilliance. The proof of success at each stage will be in a demo of a functioning program to a staff member. Motors will run and lights will flash, so get the checkmarks as you proceed. There is no report for this week, but hand in the checklist at the end, and make sure you save your VI's at each stage under f:\Home\Jstude\. They may be used next week. Part 1: motor.vi : basic stepper motor control The stepper motors in the 341 lab are controlled directly by mysterious black boxes produced by Anaheim Automation. The function of these controller boxes is to perform the elementary step control timing so that simple command strings can be used to determine complete event sequences. This relieves the main computer CPU from the tedious and unimaginative business of basically going [up. .count. .down. .count. .] many thousands of times. The command strings are ASCII coded sequences, with short letter codes, followed by numbers. The first example LabVIEW program, motor.vi , generates these control codes and sends them to the motor controller through the serial port. 1. Start up LabVIEW and open motor.vi [in JStude/VIs]. Make sure the Anaheim controller box is turned on, and that the serial cable is connected. Run the program (in single-shot mode, not continuous loop), just as it is, with default values for the inputs. If the motor does not turn smoothly, alert a staff member. If it does, then experiment with the front panel controls and see what happens. Do this systematically so that you have a working knowledge of all the control functions before continuing with the next step. 2. Open up the Block Diagram of motor.vi . Take a deep breath. The light yellow VI's are all basically string-building VI's and details of their function are unimportant. Observe that they function primarily to convert inputs and string constants into one long, single command string, which is then sent to the serial port. Note how the serial port output is done by a single VI, and we do not have to care about its internal workings, provided it does work. And that's all. 3. Switch back to the Front Panel, and run motor again. Examine the output string that is reported. This is the string that is sent to the motor controller. It actually does 8 things. Look up these 8 things in the Anaheim Program Reference Manual provided, and write them down in the Checklist. Get your first checkmark of the week. 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/20/2009 for the course AME 341BL taught by Professor Spedding during the Spring '08 term at USC.

Page1 / 10

ExpB5 - Exp5: Further adventures in LabVIEW programming:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online