Lesson 3 - Troubleshooting and Debugging VIs
Lesson 3 - Troubleshooting and Debugging VIs
TOPICS
A. B. C. D. E. LabVIEW Help Utilities Correcting Broken VIs Debugging Techniques Undefined or Unexpected Data Error Checking and Error Handling
ni.com/training
ni.com/training
ni.com/training
Become familiar with using the Context Help window, the LabVIEW Help, and the NI Example Finder. GOAL
You are given a VI containing unfamiliar functions. How do you determine the functionality in the block diagram?
DISCUSSION
ni.com/training
A required block diagram terminal is unwired A subVI is broken or you edited its connector pane after you placed its icon on the block diagram of the VI
ni.com/training
C. Debugging Techniques
Your VI isnt broken, but you are getting unexpected data or behavior Any unwired or hidden subVIs? Incorrect default data being used? Undefined data being passed? Numeric representation correct? Node execution order correct?
ni.com/training
ni.com/training
ni.com/training
ni.com/training
NaN
Not a number Produced by invalid operations, such as taking the square root of a negative number
Check for unexpected Inf values or NaN values in your mathematical operations
ni.com/training
ni.com/training
Select FileVI Properties and select Execution from the Category pull-down menu to disable automatic error handling for a specific VI
ni.com/training
ni.com/training
ni.com/training
If you have a VI with a broken Run arrow, what should you do first? After you fixed your broken Run arrow, your VI results show unexpected data. What can you do next? DISCUSSION
SummaryQuiz
1. How do you disable automatic error handling? a) Enable execution highlighting b) Wire the error out cluster of a subVI to the error in cluster of another subVI c) Place a checkmark in the Show Warnings checkbox of the Error List dialog box
ni.com/training
SummaryQuiz Answer
1. How do you disable automatic error handling? a) Enable execution highlighting b) Wire the error out cluster of a subVI to the error in cluster of another subVI c) Place a checkmark in the Show Warnings checkbox of the Error List dialog box
ni.com/training
SummaryQuiz
2. Which of the following are the contents of the error cluster? a) Status: Boolean b) Error: String c) Code: 32-bit integer d) Source: String
ni.com/training
SummaryQuiz Answer
2. Which of the following are the contents of the error cluster? a) Status: Boolean b) Error: String c) Code: 32-bit integer d) Source: String
ni.com/training