If your VI runs but does not produce the results you expect, you often can solve the problem by taking the following actions:
To eliminate all VI warnings, select Windows»Show Error List and place a checkmark in the Show Warnings checkbox on the Error list window to see all the warnings for your VI. Determine the causes and eliminate them from your VI.
Triple-click the wire with the Operating tool to highlight its entire path and to ensure that the wires connect to the proper terminals.
Select Help»Show Context Help to check that VIs and functions are wired correctly.
Use the Find dialog box to search for subVIs, text, and other objects to correct throughout your application.
Check the default values for each function and subVI in your block diagram by selecting Help»Show Context Help. Many VIs and functions pass default values if optional inputs are left unwired. For example, a Boolean input might be set to TRUE if left unwired and you might be expecting a FALSE value as an output.
Select Browse»Show VI Hierarchy to find unwired subVIs. Unlike unwired functions, unwired VIs do not always generate errors or warnings unless you configure an input to be required or recommended, respectively. If you mistakenly place an unwired subVI on the block diagram, it executes when the block diagram does. Consequently, your application could perform extra actions.
Determine if the data you are passing from one function or subVI is undefined. This often happens with numbers. For example, at one point in your VI an operation could have divided a number by zero, thus returning Inf (infinity), whereas subsequent functions or subVIs were expecting numbers.
If your VI runs slower than expected, confirm that you turned off execution highlighting in subVIs. Also, close subVI front panels and block diagrams when you are not using them because open windows can affect execution speed.
Check the representation of your controls and indicators to see if you are receiving overflow because you converted a floating-point number to an integer or an integer to a smaller integer. For example, you might wire a 16-bit integer to a function that only accepts 8-bit integers. This causes the function to convert the 16-bit integer to an 8-bit representation, potentially causing a loss of data. Refer to Preventing Undefined Data for more information.
Verify you initialized shift registers properly unless you intend for them to save data from one execution of the loop to another.
Check the cluster element order at the source and destination points. LabVIEW detects data type and cluster size mismatches at edit time, but it does not detect mismatches of elements of the same type.
Check the node execution order. Refer to the Data Dependency and Artificial Data Dependency section in Chapter 5, Building the Block Diagram, of the LabVIEW User Manual for more information about node execution order.
Check that you do not have hidden VIs. You inadvertently might have hidden a subVI by dropping one directly on top of another node or by decreasing the size of a structure without keeping the subVI in view.
Also check the inventory of subVIs the VI uses against the results of Browse»This VI's SubVIs and Browse»Unopened SubVIs to determine if any extra subVIs exist. Also open the Hierarchy window to see the subVIs for a VI. To help avoid incorrect results caused by hidden VIs, specify that inputs to VIs are required.