Textbook for this Primer
This LabVIEW primer is based off of the book "Hands-On Introduction to LabVIEW for Scientists and Engineers" by John Essick. Two copies of the book can be found in the lab to the right of the computer setup.
Accessing LabVIEW on Our Computers
Currently LabVIEW is installed on one machine in the lab. When looking at the desktop computers straight on, the rightmost computer closest to the books contains an installation of LabVIEW. This computer runs Linux but has Windows 7 installed as a virtual machine. Our version of LabVIEW is installed on Windows, so the Windows virtual machine must be ran before LabVIEW can be accessed. Running Windows is simple; there is a shortcut on the Linux desktop called "Hankwin" which can be clicked to open. Once Windows is running, LabVIEW can be found in the Programs menu.
What is LabVIEW?
LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a development environment and system-design platform for a visual programming language called "G". LabVIEW is commonly used by scientists and engineers for the purposes of data acquisition, instrument control, and industrial automation. It is developed and maintained by National Instruments.
LabVIEW is made for engineering and experimental science. It is a programming language and underneath the hood it does most things similarly to other text-based programming languages, but all of this information is presented to the user very differently. LabVIEW is a visual and graphical programming language. Instead of pages of text, LabVIEW source code appears as a graphical block-diagram. These graphical block-diagrams contain function-nodes (analogous to functions in Python for example) that the user draws virtual wires between. These virtual wires between different function nodes allow the transfer of variables. This style of programming is called dataflow programming.
LabVIEW also includes extensive hardware support for interfacing with cameras, sensors, and other devices. Users can interface to hardware by either writing direct bus commands (USB, GPIB, Serial) or using high-level, device-specific, drivers that provide native LabVIEW function nodes for controlling the device. LabVIEW's ability to interact with and control different devices is essential to experimental physics and lab work in general.
Learning from the Text
The first four chapters of the text are considered to be essential for understanding the basics of LabVIEW. They are also meant to be completed sequentially as each section builds on previous sections. Chapters after number 4 are meant to be more like independent modules that can be completed in any desired order. The content of chapters is summarized below:
Chapters 1-3: Fundamentals of the LabVIEW Graphical Programming Language. Central features of LabVIEW including its control loop structures, graphing modes, mathematical functions, and text-based MathScript commands are learned in the course of writing digitized waveform simulation programs.
Chapter 4: Basic Data Acquisition. Concepts of digitized data such as resolution, sampling frequency, and aliasing are covered. Then, using LabVIEW's high-level Express VIs, programs are written that execute analog-to-digital, digital-to-analog, and digital input/output tasks on a National Instruments DAQ device. Computer-based instruments constructed included a DC voltmeter, digital oscilloscope, DC voltage source, waveform generator, and blinking LED array.
Chapters 5-8: More LabVIEW Programming Fundamentals. Implementation of data file input/output, local memory, and conditional branching in LabVIEW is investigated while writing several useful programs (e.g., spreadsheet data storage, numerical integration, and differentiation). Additionally, LabVIEW's control flow approach to computer programming is studied.
Chapters 9 and 10: Data Analysis. Proper use of LabVIEW's curve fitting and fast Fourier transform function is investigated. Using Express VIs to control a DAQ device, two computer-based instruments (a digitized thermometer and a spectrum analyzer) are constructed.
Chapter 11: Intermediate-Level Data Acquisition. Programs are written to carry to carry out analog-to-digital, digital-to-analog, and digital counter tasks on a DAQ device using the conventions of DAQmx. This lower-level approach (in comparison to the high-level Express VIs) allows utilization of the full available range of DAQ device features. A DC voltmeter, DC voltage source, waveform generator, and frequency meter are constructed, as well as a sophisticated digital oscilloscope based on the state machine architecture.
Chapter 12: Temperature Control Project. A wide range of the LabVIEW skills acquired throughout the book are used to construct a Proportional-Integral-Derivative (PID) temperature control system. Appendix I gives a design for the hardware required for this project.
Chapter 13: Control of Stand-Alone Instruments. Using LabVIEW's VISA communication driver, control of the stand-alone instrument over the General Purpose Interface Bus (GPIB) as well a the Universal Serial Bus (USB) is studied. An Agilent 34410A Multimeter is used to demonstrate the central concepts of interface bus communication between a PC and stand-alone instrument.
Chapters from the Text
Chapter 1 - The While Loop and Waveform Chart
Chapter 2 - The For Loop and Waveform Graph
Chapter 3 - The Mathscript Node and XY Graph
Chapter 4 - Data Acquisition Using DAQ Assistant
Chapter 5 - Data Files and Character Strings
Chapter 6 - Shift Registers
Chapter 7 - The Case Structure
Chapter 8 - Data Dependency and the Sequence Structure
Chapter 9 - Analysis VIs: Curve Fitting
Chapter 10 - Analysis VIs: Fast Fourier Transform
Chapter 11 - Data Acquisition and Generation Using DAQmx VIs
Chapter 12 - PID Temperature Control Project
Chapter 13 - Control of Stand-Alone Instruments