LabVIEW

From PrattWiki
Jump to navigation Jump to search

This is a TOTAL sandbox for all things LabVIEW. It will get more structure as time goes on...

  • Module 1
    • VI: Virtual Instrument
    • DAQmx driver for NI DAQ devices
    • Front panel for UI, block diagram for code
  • Module 2
    • Project Explorer - where things begin! And where files are managed!
    • lvproj, vi, and ctl extensions for projects, instruments, and controls
    • Help menu - woo!
    • Front Panel - user interface; controls and indicators (input and output) linked to diagram
    • Block Diagram - code of the vi; terminals, functions, nodes, and wires
    • Create project
    • Exercise at the end is a little more complicated than it should be...
  • Module 3
    • Front panel
    • Controls supply data (knobs, buttons)
      • Boolean switches
      • Dials
    • Indicators show values (graphs, charts)
    • Right-click to add things; different styles
      • Numeric, boolean, strings, graphs
      • Drag to add to the panel and then label it
      • Right-click menu to modify
    • Numeric - can be complex!
    • Boolean - on or off
    • String - ASCII characters
    • List, Table, Tab, Enum, File
    • End of module exercise = VERY FRUSTRATING! No idea how to do it correctly.
  • Module 4
    • Context help, Terminals, Nodes, Wires, Constants, Wiring Tool, Function Palette
    • Context help - hover; CTRL-H to toggle
    • Terminals - label names some in block diagram and front panel; rt click to unlabel in
    • Nodes - inputs and outputs (fcn, subvi, structures)
      • Structures - loops and case
    • Wires - transfer data - style and color depend on type and dimension
    • Constant - constant...obvi
    • Wiring tool - hover, spool of wire, click 1, click 2; View->Tools Palette\
    • End of module exercise = OMGWTFBBQ! Skip past the "Put the label on the thing" and the rest work fine
  • Module 5
    • Node works only when all inputs available; output only when node done
    • Thankfully, these EOM work!
  • Module 6
    • Express VIs - summaries, but overhead
    • Drivers for 3rd party
    • DAQ Assistant, Simulate Signal, Read From Measurement
    • Amplitude and Level, Statistics, Spectral, Tone, Filter
    • Write to measurement, Build Text
    • Indicators: Numeric, Chart, Graph - use Dynamic Data Type (dark blue)
    • Building - use DAQ Assistant from functions palette
    • Wait - why did the voice change?
    • Annnnnd the exercises reject the right answer but take a wrong answer. Uff. Annnnnd can't actually see the names of all the options. Dante must be proud.
  • Module 7
    • This oughtta be good - "debugging?" ??
    • Run button broken is ultimate fail
    • Step into, over, out buttons for troubleshooting
    • Probe to check wire values
    • Error-out to error-in passes errors along; error handler VI at the end gets them all
  • Module 8
    • Loops for repeating code, such as taking data
    • While loops and For loops
    • Programming->Structures->While; then draw box around code to loop
    • While loop conditional in bottom right - can be a stop or a go
    • While loop iteration terminal at bottom left
    • Loop tunnels pass information outside of loop
    • For loop count terminal at top left
    • Shift registers to store information from prior
    • Waveform chart will keep track of all iterations of data graphically
  • Module 9
    • Use input values to determine what subdiagrams to use
    • Structures->Case and draw it around
    • Selector at bottom left (green); adapt based on actual input type
  • Module 10
    • Data structures - arrays (similar types) and clusters (different types)
    • Array Shell - put the indicator in - can change to 1D and then 2D
    • Waveform graph can display array data
    • Bundles make cluster wires; unbundle splits out; Cluster, Class, and Variant; "by name" version can be helpful
    • Front Panel: Array Matrix and Cluster Palette -> add indicators and get a cluster in Block Diagram