©2017 Physics Department
Oregon State University

Syllabus for Spring 2017

last update 2 June 2017
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)
  • Virtual Instrument (VI)
  • Front Panel
  • Block Diagram
  • Palettes
    • Tools
    • Controls
    • Functions
  • Controls (Inputs)
  • Indicators (Outputs)
  • Wiring
  • While Loop
  • Loop timing
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)

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)
  • 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 manual and 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
  • 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)
  • MAX
  • Resolution (bits)
  • Scale (gain)
  • Speed
  • TTL signal levels
  • DAQ Assistant
  • DAQmx
Thu
Apr
13
Digital I/O: Input
  • Build VI to measure digital input from Function Generator
    • 1 bit from TTL signal (DigitalBitIn.vi)
    • TTL waveform: Display on graph
  • Build VI for digital output and input (DigitalInOut.vi)
    • Control (out) and measure (in) external digital logic chip
      • NAND gate (7400 chip)
      • Build Truth table (Experiment and LabVIEW theory)
    • For loop through truth table
    • Measure results and compare with LabVIEW logic
    • Case Structure: NAND, AND, OR, XOR (LabVIEW theory)
  • Digital Waveform
  • Waveform Array
  • Index Waveform Array
  • For Loop
  • Case Structure
3
Tue
Apr
18
Analog Input
  • Temperature sensor: TMP 36
    • Build VIs for temperature sensor input
    • 1 point read (TempIn1pt.vi)
      • Use DAQmx in While loop
      • Use DIFF or NRSE input mode (see p. 4-11 (p. 33) of 322661b.pdf LabVIEW measurements manual)
      • Display single value (C, K, F)
      • Meter display (thermometer)
      • Build array with feedback node and display on chart
      • Build waveform and display on graph
  • Math calculations
  • Task timing
  • Graph vs. chart
  • Array vs. waveform
  • Feedback node
Thu
Apr
20
Analog Input
  • Temperature sensor: TMP 36
    • Build VIs for temperature sensor input
    • N point read (TempInNpt.vi)
      • Read N points
      • Waveform display on graph
      • DAQ input modes
4
Tue
Apr
25
Analog Input
  • Function generator Input
    • Build VI for function generator input (FncGenIn.vi)
    • Use DAQmxTiming.vi and DAQmxTrigger.vi
    • 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
  • 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
    • CNX Online tutorial: §11.5 Instrument I/O Assistant Exercise
    • Build MyIOAsst.vi
    • Set and Query Instrument Parameters
  • 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
  • VISA
  • Instrument Driver
7
Tue
May
16
Instrument Control
  • AFG3021B Arbitrary Function Generator
    • Output arbitrary waveform (ArbWaveOut.vi)
    • Use Instrument Drivers or VISA
    • Determine AFG output resolution
Thu
May
18
Instrument Control
  • TDS1002B Digital Oscilloscope
    • Record waveform (ScopeDataIn.vi)
    • Use Instrument Drivers or VISA
    • 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
  • Build VI for Impulse input (LRCimpulse.vi)
    • Vary impulse time
    • Fourier transform output
    • Plot response function
    • Save data to Excel
    • Compare two methods for measuring response function
  • FFT
Thu
June
1
Spectral Analysis (can skip if not started yet)
  • 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 AI data read with Fnc Gen Sync
  • Average signal to reduce noise
  • Signal-to-Noise Ratio (SNR) with SINAD analyzer vi
  • Plot SNR vs. number N of traces averaged
  • Show that SNR grows as Square Root of N
  • Lock-in Amplifier
  • Phase sensitive detection
Thu
June
8
Signal Averaging


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

OSU Disclaimer

NSF Disclaimer