©2023 Physics Department
Oregon State University

Syllabus for Spring 2023

last update 3 April 2023
Course Information
Other resources

PH 415: Computer Interfacing and Instrumentation

Week
Date
Activities Topics
1
Tue
Apr
4
Test drive LabVIEW. Open LabVIEW and use Find Examples to run this VI: Power Spectrum Measurement

FUN (later) Moonlanding Download and test drive later

LabVIEW Introduction

OpenStax CNX Online tutorial: §2 Introduction (Open Contents)

  • §2.1 LabVIEW (Read)
  • §2.2 LabVIEW Environment (Read)
  • §2.3 Front Panel (Read)
  • §2.4 Block Diagram (Read)
  • §2.5 Acquiring a Signal VI Build VI (AcqSignal.vi) (same exercise as Ch. 1 in GSLV) (Find Template under File-New...-VI-From Template-Simulation-Generate & Display)
Thu
Apr
6

CNX Online tutorial: §2 Introduction

  • §2.6 Dataflow Programming (Read)
  • §2.7 Express Filter VI (Do)
  • §2.8 LabVIEW Documentation Resources (Read)
  • §2.9 Reduce Samples VI (Build VI: ReduceSamples.vi) (same as Ch. 2 in GSLV)
  • Change Graph properties to show individual points

Build VIs to study binary numbers (BinaryCounter.vi, BinaryLooper.vi)

CNX Online tutorial: §10 Data Acquisition and Waveforms

  • §10.1 Overview and Configuration of DAQ Devices (Read)
  • §10.2 Measurement & Automation Explorer (MAX) (Do)
    • Use MAX to confirm board I/O (A&D) (ignore temperature task)
  • Express VIs
  • Context Help
  • Data types
  • Arrays
  • Data conversion
  • Data acquisition
  • Digital I/O
  • Analog I/O
2
Tue
Apr
11

CNX Online tutorial: §10 Data Acquisition and Waveforms

  • Use MAX to determine/verify DAQ board specifications (see Other resources page for PCI-6221 pin diagram)
    • Analog Input
      • Resolution
      • Scale
      • Speed
    • Analog Output
      • Resolution
      • Scale
      • Speed
    • Digital Input & Output
      • Bits
      • Signal Levels
  • §10.3 Data Acquisition in LabVIEW (Read)

Digital I/O: Output

  • Build 2 VIs to output byte to control LED array (Circuit Diagram)
  • 1) Use DAQ Assistant for I/O board control
    • §10.14 Digital Example VI. Combine aspects of the Digital-Example-VI and your own Binary Looper VI to build DigitalLEDAsst.vi.
  • 2) Use DAQmx Functions for I/O board control (Help video)(More DAQmx info)
    • Modify Write Dig Port.vi example and build DigitalLEDmx.vi to do same tasks as DigitalLEDAsst.vi
  • MAX
  • Resolution (bits)
  • Scale (gain)
  • Speed
  • TTL signal levels
  • DAQ Assistant
  • DAQmx
Thu
Apr
13
Digital I/O: Input
  • Build VI to read digital input from Function Generator (modify DigitalLEDmx.vi; use DAQmx, not Assistant)
    • 1 bit from TTL signal (DigitalBitIn.vi)
    • TTL waveform: Display on chart
  • Build VI for digital output and input (DigitalInOut.vi)
    • Write (out) and Read (in) to/from external digital logic chip
      • NAND gate (7400 chip) (Circuit Diagram)
      • Use Sequence structure to order timing of Write/Read
      • Build Truth table (Experiment and LabVIEW theory)
    • For Loop: step through truth table input values, use indexing tunnel for building array of results outside loop
    • Record results and compare with LabVIEW logic
    • Case Structure: NAND, AND, OR, XOR (LabVIEW theory)
3
Tue
Apr
18
Analog Input
  • CNX Online tutorial: §10.4 Analog Input (Read)
  • Temperature sensor: TMP 36. (Circuit Diagram)
    • Build VI for temperature sensor input (as a voltage)
    • 1 point read (TempIn1pt.vi)
      • Use DAQmx in While loop (modify Digital VI to read analog signal)
      • Use DIFF input mode (see p. 4-11 (p. 33) of 322661b.pdf LabVIEW measurements manual)
      • Display single value (C, K, F)
      • Meter display (thermometer)
      • Display on chart
      • Build array inside loop with feedback node, build waveform, and display on graph
  • Math calculations
  • Graph vs. chart
  • Array vs. waveform
  • Feedback node
Thu
Apr
20
Analog Input
  • Temperature sensor: TMP 36 (continued)
    • Build VI for temperature sensor input
    • Use DAQmxTiming.vi (Read info here)
    • N point read (TempInNpt.vi)
      • Read N points
      • Waveform display on graph
      • DAQ input modes
  • Task timing
4
Tue
Apr
25
Analog Input
  • Oscilloscope with Input from Function Generator
    • Build VI so that LabVIEW reads function generator input and acts as an oscilloscope (OScopeIn.vi)
    • Use DAQmxTrigger.vi (Read info here)
    • Waveform display
    • Two inputs (signal and trigger)
    • Trigger data collection (use PFI input)
    • Determine speed and resolution limits
  • Digital trigger in
Thu
Apr
27
Analog Output
  • Build VIs for Function generator output
    • 1 point in while loop (FncGenOut1pt.vi)
    • N points in while loop (FncGenOutNpt.vi)
    • Knobs to simulate function generator instrument
    • Determine speed and resolution limits
  • Software timing
  • Hardware timing
5
Tue
May
2
Analog Input and Output: Feedback
  • Temperature sensor input & heater output. (Circuit Diagram)
  • Build VI for Thermostat control (TempOnOff.vi)
  • Record system response
  • Feedback control
Thu
May
4
PID Feedback Control
  • Read PID Tutorial
  • Temperature sensor input & heater output
  • Build VI for PID control (TempPID.vi)
  • Use arrays for Integral and Differential parts
  • Vary gains
  • Record system response
  • PID Feedback
    • P: Proportional
    • I: Integral
    • D: Differential
6
Tue
May
9
Instrument Control via USB interface
  • MAX
    • TDS1002B Digital Oscilloscope (Manual)
    • AFG3021B Arbitrary Function Generator (Manual)
    • Configure
    • Set and Query Instrument Parameters
  • Instrument I/O Assistant
  • Instrument Commands
Thu
May
11
Instrument Control
  • VISA
    • CNX Online tutorial: §11.7 Programming with VISA
    • Build MyVISAWrite&Read.vi
    • Set and Query Instrument Parameters
    • CNX Online tutorial: Read §11.8 About Instrument Drivers and §11.9 Using Instrument Driver VIs
  • VISA
  • Instrument Driver
7
Tue
May
16
Instrument Control
  • AFG3021B Arbitrary Function Generator
    • Output standard waveform (sine, square, etc) or arbitrary waveform (ArbWaveOut.vi)
    • Use Instrument Drivers
    • Determine AFG output resolution by observing signal on oscilloscope
Thu
May
18
Instrument Control
  • TDS1002B Digital Oscilloscope
    • Record waveform from function generator (ScopeDataIn.vi)
    • Use Instrument Drivers
    • Determine oscilloscope input resolution
8
Tue
May
23
LRC Resonance Experiment
  • Series LRC circuit (see PH424)
  • Build VI for Sinusoidal input to LRC (LRCsine.vi)
    • Vary sine frequency from Function Generator
    • Record circuit response with Oscilloscope
    • Plot response function (amplitude and phase)
    • Save data to Excel
  • File I/O
  • Timing
  • Loop indexing
  • Instrument VI Tree
Thu
May
25
LRC Resonance Experiment
9
Tue
May
30
LRC Impulse Experiment
  • Vary impulse time manually and determine optimal pulse width
  • Build VI for Impulse input (LRCimpulse.vi)
    • Fourier transform output
    • Plot response function
    • Compare two methods (sine and implulse) for measuring response function
  • FFT
Thu
June
1
Spectral Analysis
  • Build VI for Spectral Measurement (Spectrum.vi)
  • Noise Generator + Sine Wave ( Op amp adder )
  • FFT
  • Power Spectrum, Units
  • Aliasing
  • Parseval's Theorem: Power same in Time and Freq domains
  • Windowing
10
Tue
June
6
Signal Averaging
  • Build VI for Time Domain Averaging (Taverage.vi)
  • Noise Generator + Sine Wave (Op amp adder)
  • Trigger Oscilloscope with Fnc Gen Sync (TTL)
  • Average signal to reduce noise
  • Power Signal-to-Noise Ratio (SNR) with SINAD analyzer vi
  • Plot SNR vs. number N of traces averaged
  • Show that SNR grows linearly with N
  • Lock-in Amplifier
  • Phase sensitive detection
Thu
Jun
8
Signal Averaging


If you have comments or suggestions, email Prof. McIntyre at mcintyre@ucs.orst.edu

OSU Disclaimer

NSF Disclaimer