Debugging, Creating subVIs, Documenting Code
In LabVIEW Core 1, Module 7 on Debugging and Troubleshooting we learn how to locate and correct two main types of programming issues:
- syntax errors that cause your VI to not be executable (resulting in a broken run arrow), and
- logic errors that cause your VI to give incorrect results.
Then we skip ahead to Module 12, Reusing Code which describes how to set up a VI so that it can be used as a subVI by creating an icon and defining the connector pane terminals. This module also shows how to add documentation to your subVI.
Access LabVIEW Core 1 Course- 7. Debugging and Troubleshooting
- 12. Reusing Code
The following pages contain an overview of some different methods in LabVIEW to perform basic calculations and some information about LabVIEW’s built-in Help system.
In the following videos we expand on our example that uses the TMP-36 temperature sensor, by creating a subVI for scaling the measured voltage to temperature, adding some documentation to the top-level VI and subVI, and demonstrating some debugging techniques. Watch these videos and practice the techniques of subVI creation, documentation, and debugging.
Creating subVIs
Documenting a VI
Debugging Techniques
Throughout the course we will focus on understanding a few different design patterns that describe the structure of our LabVIEW virtual instruments. The two most basic design patterns that every programmer uses whether they know it or not are called the Continuous Loop and the Immediate subVI. You will use these two design patterns in your first couple of assignments. The top-level VIs in these early assignments will be Continuous Loops and the subVIs used for scaling data will be Immediate subVIs.
The bulk of time in class today will be spent continuing to work on the Tilt Sensor assignment. Hopefully by the end of class today you will have this assignment nearly finished.