Title slide Implementing LabVIEW in an Intermediate Physics Laboratory Steven Sahyun Physics Department, University of Wisconsin - Whitewater, Whitewater, Wisconsin 53190 sahyuns@uww.edu AAPT Greensboro August 1, 2007 FH03 Supported in part by a National Instruments equipment grant. Equipment Students worked in pairs for three weeks at a computer workstation equipped with a computer and a National Instruments NI-6009 USB interface unit. Each computer had LabVIEW 8.2 installed. A department site license was acquired through a National Instruments grant. University (College Dean) provided funds to purchase NI-6009 USB interface units for the laboratories. Small supplementary items (LEDs, photocells, motors) were purchased from Radio Shack with instructional funds. NI USB-6009 14-Bit, 48 kS/s Multifunction Data for USB Analog: 8 input, 2 output channels, Digital: 4 input, 8 output. ($243/ea) Sophomore Level Intermediate Laboratory course: 2 cr.; 4 hr/week Lab Station 1: Computer Interfacing. (3 Weeks) Students learn basics of LabVIEW programming to acquire data and control devices. Student groups then rotate through the following lab stations Lab Station 2: Electron properties. (2 Weeks) •Helmholtz coil field mapping. •e/m ratio •Millikan Oil Drop Lab Station 3: Magnetism (2 Weeks) Magnetic dipole moment and torque experiments and a brief introduction to vacuum systems. Lab Station 4:Material Properties. (2 Weeks) • Using a spectrophotometer with LabVIEW for data collection. • Scanning Tunneling Microscope. Synchrotron Radiation Center Experience: (3 Weeks) Students visit and use the SRC for photoemission studies of materials of their own choosing. SRC instrumentation and data collection is controlled remotely by LabVIEW via a Web interface. Earth’s Field NMR Lab (2 Weeks) Lab 1: Guided Exercises: 2 Lab periods (4 hrs) Topic Exercise Creating a Virtual Instrument Exercise 0 - Perform a mathematical function on two numbers. Working with Loops Exercise 2 - Add a loop structure to convert the temperature from degrees Celsius to Fahrenheit so that it will run until stopped. Controls and data Types Exercise 3 - Switches, lights, Boolean and conversion. Using Charts Exercise 4 – Build a vi to display a simulated “noisy” sine signal. DAQ – Data Acquisition with the 6009 Exercise 5: Acquire and graph an input signal from a function generator. Start with InputStarter.vi Recording and Saving Data Exercise 6 – Create a vi that will record a graph’s data using the “Write to Measurement File” subVI. Exercise 2 sample: The “Front Panel” contains Controls and Indicators The “Block Diagram” contains the program of components wired together. Lab 1: Assigned tasks: 4 Lab periods (8 hrs) Assignment example: Physics 221: Intermediate Laboratory Station 1 Assignment: Computer Interfacing Objectives: You will learn basic functions and methods for transferring data from devices to computers and use computers to generate signals to remote devices. You will become acquainted with a digital storage oscilloscope as well as the LabVIEW program. 1. 2. 3. Complete the Introduction to LabVIEW exercises. Complete a LabVIEW program to graph and save data Complete a LabVIEW program to create a Decimal to Binary converter; use two LED lights connected to the NI-6009 interface to display the result. 4. Use the NI-6009 interface to turn on a LED diode when triggered by a signal from a photocell. 5. Use the NI-6009 interface to run a small motor when triggered by a signal from a photocell. This will require the use of a “Darlington” circuit. 6. Create a LabVIEW program to acquire and save to a file the waveform produced by a function generator. Extra credit: Pass the LabVIEW fundamentals exam at http://www.ni.com/training/labview_exam.htm Supplemental LabVIEW material available on request. Progress and programs will be kept track of in your Laboratory Notebook. At the end of the Lab Station, you will turn in your notebook as well as a lab report detailing your activities. Grading will follow guidelines of the rubrics handed out in the course syllabus. Result for Task 5: Run a small motor with LabVIEW. Photocell uncovered, Photocell covered, Motor is off. Motor is on. Circuit to increase the current to the motor LabVIEW block diagram controlling the motor. LabVIEW front panel. Lab Station 4: Spectrophotometer A LabVIEW virtual instrument is used to collect spectrophotometer data. This VI is similar to one the students created earlier in the semester. Synchrotron Radiation Center SPECTRA: Photoemission experiment LabVIEW is used at the SRC to remotely control the instrument and collect data. For more information: e-mail: sahyuns@uww.edu PPT Poster at: http://academics.uww.edu/physics/scs/conferences.html Synchrotron Radiation Center SPECTRA: http://spectra.src.wisc.edu/ SRC Paper: Undergraduate student laboratory experience at the Synchrotron Radiation Center, Steven C. Sahyun, Jeffrey M. Polak, and Christopher J. Moore Am. J. Phys. 74, 987 (2006)