Tests reference

DQMH Consortium Style

These tests check block diagrams for conformance to the DQMH Consortium style guidelines.

Broken RTE Code

Detects broken code within a "RUN_TIME_ENGINE==True" frame of a conditional disable structure. This can result in a situation where your VI runs fine in the IDE, but app builder returns build errors when attempting to build the code into an EXE.

CTL Label Match

This test returns a failure if the top-level control on the panel of a .ctl file has a label that does not match the file name. Control definitions should have the same label as the file name, for code consistency.

Current VIs Path Issues

Returns a failure for any Current VI’s Path function wired to a Build Path or Strip Path function. Building paths based on the path of the current VI can cause problems when the code is built into an executable.

Cursor VI Error Output

Returns a failure for any Set Busy.vi or Unset Busy.vi with its error output wired to anything other than a Clear Errors.vi or a sequence structure border tunnel (with nothing wired inside the structure).

Default Right-click Menus

Returns a failure for any VI that displays its own panel and has 'Allow default run-time shortcut menus' selected. UI VIs should not enable default right-click menus.

Duplicate Cluster Element Names

Returns a failure if an Unbundle By Name or Bundle By Name function is accessing a cluster element that shares the same name as another cluster element. In this situation, LabVIEW may erroneously re-map the bundled/unbundled parameter name when the cluster contents change. The workaround for this issue is to use multiple bundle/unbundle functions cascaded together instead of a single function operating on a nested item.

Error Shift Register on Event Loop

Returns a failure for an event structure in a while loop, and the while loop has an error shift register where the error wire is passed through the event structure. This design could cause confusing error handling behavior, where a subsequent iteration of the event structure would not execute correctly because a previous iteration generated an error.

Faulty Functional Global

Detects a single-iteration loop that does not have any uninitialized shift registers. This may be an indication that the developer intended to implement a functional global variable, but forgot to add the uninitialized shift register to maintain state.

File Dialog Issues

Returns a failure if any of the following conditions are true with usage of the File Dialog express VI: 1. Prompt, Pattern, and/or Pattern Label inputs are unwired. 2. Error output is unwired, and Auto Error Handling is enabled on the calling VI. 3. Error output is wired to anything other than a Clear Errors VI. 4. Error output is wired to a Clear Errors VI, but the VI is clearing an error other than '43'.

This test is provided by the Delacor Style suite of tests.

Find User Visible Strings

Returns a failure for any string constant or string control with a default value that contains any alphabetical characters.

Find VI Calls

This test will find calls to certain VIs. It not only checks for subVI calls, it also checks for string constants and controls with the VI name in them (which could possibly be used for dynamic calls).

First Call in Reentrant VI

Returns a failure if a First Call? function is found on the diagram of a reentrant VI. Since this function maintains state, it is probably the intent of the code author that the VI be non-reentrant.

Forked Event Reg Refnum Wire

This test detects any event registration refnum wire (or a cluster wire containing event registration refnums) that is forked. It is generally considered bad practice to wire an event registration refnum wire to multiple event structures.

Full Names on Bundlers

Returns a failure for any Bundle By Name or Unbundle By Name function with 'Hide Full Names' selected, while bundling or unbundling a nested cluster element. Not only does this option hinder diagram readability, but it can also cause bugs if the contents of the cluster are changed and LabVIEW incorrectly links to a different cluster item.

Gather Error Ring Data

Returns a failure for any Error Ring, and includes the code and the message configured inside the error ring.

Icon View Detect or Correct

This test will return failures for control and indicator terminals on the diagram that match a user-specified view (Icon or Non-icon view). It also provides an option to modify the code to change the view to the other style.

In Range Exclusion

Returns a failure for any In Range and Coerce function with the following characteristics: 1. Either or both of the limits set to be excluded. 2. Both limits are of type integer. 3. The coerced output is wired.

Invalid Control Labels

Return a failure for any control label that contains an illegal character specified in the test.

Join Numbers Coercion

Returns a failure if any input on a Join Numbers function has a coercion dot. This can often result in loss of bits. Value should be coerced to the proper type before being wired to Join Numbers.

Library Member Paths

This test returns a failure if library member VIs do not reside in the same folder as the .lvlib file. The test is configurable to allow nested folders on disk next to the .lvlib file.

Limit to Single Line on Strings

Long Wire Documentation

This test returns a failure if a long wire does not have a label. Long wires should be labeled to aid in code documentation. The minimum wire length required to have a label is specified in the test configuration.

Matching Icon Library Layer

This test returns a failure if the NI_Library layer of a VI’s icon does not match the value of the library’s banner icon. When moving VIs between libraries, or changing library icons, you should ensure that VIs always have the current owning library’s banner in their icons.

Multiple Global Writes

Returns a failure for any global variable value that is written in more than one location across all VIs being tested.

Non Default Error Constant

Returns a failure for any error cluster constant that contains a non-default value.

Non-Clean Default Frame

This test returns a failure for any case structure containing a 'Default' frame that includes other conditions besides 'Default'. Having a clean default frame promotes code readability and maintainability.

Pop Up Detection

Returns a failure for any VI or function that could potentially pop up a dialog during execution.

Search and Replace Text

Detects the presence of user-specified text within several parts of a VI, and optionally allows the replacement of that text with user-specified values for certain objects.

Separate Compiled Code

Returns a failure if the VI under test has the 'Separate compiled code from source file' option deselected. To facilitate effective source control, all VIs should be marked as 'Separate compiled code from source file'.

Stop Started DQMH Modules

Return a failure for any Start Module VI call in a DQMH Main VI that does not have two corresponding Stop Module VI calls. This is because any DQMH module that is started within a DQMH Main VI should also be stopped, both in the Error case and in the 'Exit' message.

String Case Structure Matching

Returns a failure for any Case Structure with a string case selector that is not set to 'Case Insensitive Match'. With rare exception, case structures should operate on strings regardless of their casing.

This test was inspired by the following test available on the VI Analyzer Enthusiasts community: https://forums.ni.com/t5/VI-Analyzer-Enthusiasts/CaseSensitiveCaseStructure-llb/ta-p/3508526

String Constant Build Path

Returns a failure for any instance of a string constant wired to the "name or relative path" input of the Build Path function. Do not wire a string into a Build Path function unless you are programmatically generating a file or folder name via string manipulation. Always use a path constant to ensure platform portability.

This test is provided by the Delacor Style suite of tests.

Subdiagram Labels

This test fails if subdiagram labels in Case Structures, Event Structures, Disable Structures or Loops are not visible. It optionally fails also if subdiagram labels are visible but empty.

Time Zone Issues

This test detects the following issues that may cause problems when operating the software in different time zones: 1. Use of the To Time Stamp function. This function returns a value that may have an unexpected offset when used in different time zones. 2. Use of the Format Into String function when there is a DBL wired in that is formatted as a time stamp. You may need to convert the DBL to a time stamp-independent time stamp before wiring it to the Format Into String function.

Typedef Enums and Clusters

Returns a failure for any cluster or enum control, indicator, or constant that is not a type definition.

Typedef File Name Convention

Ensure that the file name for type definition .ctl files ends with --cluster.ctl, --enum.ctl, or any other approved suffixes.

This test is provided by the Delacor Style suite of tests.

Unwired VI Reference

Returns a failure for any property or invoke node of the VI class that does not have its VI reference input wired. This test will skip any VI tagged as a "Main" VI. The test includes a utility to mark "Main" VIs in its configuration UI.

This test is provided by the Delacor Style suite of tests.

VIs in LLBs

This test returns a failure if a VI is found inside an LLB. VI source code should be stored as separate files, and only placed inside LLBs as part of a source distribution.

Wait for Reply in Locking Event

This test returns a failure for any DQMH Request and Wait for Reply subVI that is inside an event structure frame configured to lock the UI until the event completes. For Request and Wait for Reply events, the UI should not lock, as the subVI may take a while before returning, and you typically want the user interface to be responsive to other events while waiting for the reply.

Example Style Test Suite

These tests are provided by the NI VI Analyzer Example Style Test Suite for LabVIEW Add-ons, available here: https://decibel.ni.com/content/docs/DOC-42644

Anti-Aliased Plots

Detects plots in Waveform Graphs, Waveform Charts, and XY Graphs that are not set to "Anti-Aliased". Anti-aliased plots have a nicer appearance.

Auto Error Handling (Pre-2019)

Returns a failure for any VI with Automatic Error Handling enabled.

Char By Char App Font Usage

This test checks to make sure that user-specified fonts (Application, System, or Dialog) are used on all front panel controls, indicators, and free labels.

Default Free Label Color

Returns a failure for any diagram free label that is not the default yellow color.

Deprecated Functionality

This test detects functions, VIs, properties, and methods that were deprecated in LabVIEW 2010.

Diagram Size and Position

Checks that a block diagram completely resides within the bounds of the screen. The test also checks whether the block diagram is larger than the maximum specified width and height. If you are using a multi-monitor system, the test fails if the diagram does not reside entirely within the bounds of the primary monitor. This test works only on VIs with block diagrams.

Merge Errors Style

Detects the use of Select or Build Array functions with error data types wired as inputs. These constructs should be replaced with the Merge Errors function.

Minimum Window Width

Returns a failure if the width of the panel and/or diagram window is not large enough to display the entire toolbar contents.

Non-palette vi.lib VI Usage

Returns a failure for any subVI on an example VI diagram that is not (1) a palette VI or (2) a subVI that resides in the example’s owning folder.

Panel Color

Returns a failure if the front panel background color is the older, darker default color.

Prohibited Nodes

Returns a failure if any of the nodes prohibited by the Example Style Guide are discovered on the block diagram.

Property Node Name Format

Checks to see if Property Nodes or Invoke Nodes are set to "No Names" view. They should be set to "Short Names" or "Long Names".

Size to Text

This test ensures that object labels are always set to Size to Text.

Transparent Diagram Object Labels

Returns a failure for any control/indicator terminal or constant with a non-transparent label.

Unwired Event Nodes

Returns a failure for any Event Data Node or Event Filter Node that contains two or more terminals, and at least one of those terminals is unwired.

View Cluster Constant as Icon

Returns a failure for any cluster constant containing default values for the data type that is not set to "View As Icon".