VI Analyzer Enthusiasts Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

List of VI Analyzer Toolkit Tests

These tests ship with the VI Analyzer Toolkit:

 

  • Block Diagram
    • Performance
      • Arrays and Strings in Loops - Checks loops to see if they contain Build Array or Concatenate Strings functions. Avoid using these functions in loops because each call to them requires a dynamic resizing of the array or string, which can affect memory and processor time.  This test does not check Timed Loops.
      • Coercion Dots - Checks the total number of coercion dots on the block diagram and the number of coercion dots on individual wires and compares them to user-specified limits.
      • Enabled Debugging - Checks whether debugging is enabled or disabled. Disabling debugging improves VI performance.
      • In Place Element Structure Usage - This test detects the use of function pairs that can be replaced with the In Place Element Structure.  Use the In Place Element Structure to avoid making unnecessary memory copies.
      • Inlinable VIs - This test detects inlinable VIs that are not configured for inlining. Some VIs may show improved performance when inlined.
      • Parallel For Loop Debugging - This test reports parallel For Loops with debugging enabled. The 'Allow debugging' setting on a parallel For Loop forces sequential iteration execution and should be disabled in production code where parallel execution is required.
      • Parallelizable Loops - This test detects For Loops that can be safely parallelized. It also detects For Loops that have already been parallelized but contain non-reentrant subVIs, which prohibit parallel execution.
      • Prepend Scalar With Build Array - This test checks if the Build Array Primitive is being used to prepend an array with a scalar.
      • Redundant Boolean Operations - This test checks for "And", "Or", "Not", "Not And", and "Not Or" functions with constants wired to one or more of their inputs.  In this situation, the boolean function is not necessary and can be removed.
      • Value Property Usage - This test checks for the use of the Value property to update the values of front panel controls and indicators.  In most cases, a local variable will update front panel object values much faster than the Value property.
      • Wait in While Loop - Checks While Loops with front panel control terminals for structures or functions other than I/O functions that regulate the speed of the While Loop.
      • Wired Terminals in Subdiagrams - Checks to see if any control or indicator that is wired on the connector pane does not reside within the top-level diagram.  In order to avoid unnecessary memory copies, control and indicator terminals that are wired on the connector pane should be placed on the top-level diagram.
    • Style
      • Array Constant Style - Checks the style of array constants on the block diagram. Array constants should be styled to reasonably indicate the size of the array or have a scrollbar indicating that not all elements are visible.
      • Backwards Wires - This test checks if wires do not flow from left to right.  It does not analyze wires on Simulation Diagrams, or wires connected to Feedback Nodes.
      • Case Structure Default Frame - Highlights uses of the Default case that are in conflict with the LabVIEW Style Checklist or that are unnecessary and decrease readability of the code.
      • Code Simplification - Detects the use of block diagram constructs that can be replaced with simpler code.
      • Control Terminal Label Visible - Checks if labels of block diagram control terminals are visible.  In order to easily identify control terminals on the block diagram, their labels should always be visible.
      • Control Terminal Wiring - Checks whether wires exit control terminals from the right side and enter indicator terminals on the left side.
      • Diagram Disable Structures - This test identifies Diagram Disable Structures. While these structures may be handy during debugging, they typically only create unwanted visual noise in production code.
      • Mixed Terminal Styles - Detects whether block diagram terminals are displayed consistently. All terminals should be displayed as either icons or data types.
      • Poor Names of Enum Items - This test returns failures for enum item names that include whitespace characters. A single space character between words is allowed. This test only analyzes Control VIs that contain a single enum on the front panel.
      • Sequence Structure Usage - Checks whether the block diagram includes Stacked Sequence structures that contain more than the user-specified maximum number of frames. The test does not check Flat Sequence structures.
      • String Constant Style - Checks the style of string constants on the block diagram. String constants containing no characters fail the test. Replace them with an empty string constant. String constants set to Normal Display that contain only white space—such as spaces, tabs, or line feeds—fail the test. Set the constants to '\' Codes Display to improve block diagram readability.
      • Tunnel Position - This test checks whether all input tunnels are on the left side and all output tunnels are on the right side of a structure.  Note that this test ignores Flat Sequence Structures.
      • Unused Code - Checks for unnecessary code on the block diagram.
      • Wire Bends - Compares the total number of bends on a wire to a user-specified maximum and compares the length of each wire segment to a user-specified minimum.
      • Wire Crossings - Checks that the number of Wire crossings is less than the user-specified limit.
      • Wires Under Objects - Checks for wires that run under objects or other wires.
    • Warnings
      • Adding Array Size Elements - This test ensures that an "Add Array Elements" function is not used on the output of the "Array Size" function to determine the size of a multi-dimensional array.  If you are checking to see if a multi-dimensional array is truly empty, you should use the "Empty Array?" function on the "Array Size" output.
      • Array Sum and Product Overflow - Checks the Add Array Elements and Multiply Array Elements functions to see if the 'numeric array' input is a signed or unsigned 8-bit or 16-bit integer data type. Since the 'sum' and 'product' output of these functions matches the input data type, the add or multiply operation may result in an overflow.  Consider changing the input data type to these functions to a signed or unsigned 32-bit or 64-bit integer to reduce the possibility of an overflow.
      • Breakpoint Detection - Checks for breakpoints on the block diagram, including breakpoints on wires, nodes, and subdiagrams.
      • Bundling Duplicate Names - Checks element names in the Bundle By Name and Unbundle By Name functions for duplicates. Duplicate elements can cause confusing and sometimes incorrect block diagram behavior.
      • Case Structure with String Range - Detects Case Structures with strings wired into the Case selector with one or more ranges in Selector labels. Use of ranges is not recommended with Case Structures based on strings.
      • Error Cluster Wired - Checks that the error output on a block diagram node is wired. You can set the test to ignore VIs with automatic error handling disabled. You also can ignore nodes that usually have unwired error outputs.
      • Find Deprecated Items - Detects deprecated functions, VIs, properties, and methods. Although deprecated items usually continue to function normally, they may not be present in future LabVIEW versions. Information on the recommended new item to use can be found in the LabVIEW Upgrade Notes, the LabVIEW Help, or context help for the deprecated item.
      • For Loop Error Handling - Returns a failure for a For Loop that does not implement proper error handling to account for zero iterations.
      • For Loop Iteration Count - Checks For Loops to ensure that the VI does not use both auto-indexing arrays and the N terminal to govern the number of iterations the For Loop runs. You also can check for multiple auto-indexing arrays governing the iteration count.
      • For Loop Reference Handling - Returns a failure for a For Loop that does not implement proper reference handling to account for zero iterations. The test also has the option to return a failure if you use shift registers to pass a reference through a For Loop.
      • Globals and Locals - Checks whether a block diagram contains global and local variables.
      • Hidden Objects in Structures - Checks whether any objects in structures are hidden outside the visible bounds of the structure.
      • Hidden Tunnels - Checks tunnels, shift registers, and other structure border elements to see if they overlap each other.  Overlapping tunnels can make your block diagram difficult to read.  The test currently does not check dynamic event tunnels, tunnels on Timed Loops with frames, or tunnels on Timed Sequence Structures.
      • Indexer Datatype - Checks functions that index array elements and string characters to ensure that signed or unsigned 8-bit or 16-bit integer data types do not index string or array elements.  The test ignores functions that use constants for indexing.
      • Pattern Label - Checks whether a file dialog box that uses file patterns specifies a pattern label. The items you can check are the File Dialog function, File Dialog Express VIs, and the browse options on a path control.
      • Reentrant VI Issues - Checks for uninitialized shift registers, unitialized Feedback Nodes, and non-reentrant subVIs in a reentrant VI. Because reentrant VIs maintain multiple data spaces, unexpected results can occur when using uninitialized shift registers or Feedback Nodes.  Additionally, parallelism could be inhibited if the reentrant VI calls non-reentrant subVIs.
      • Type Casting References - This test detects the situation where a Type Cast function is being used to cast one reference type into another reference type.  This can sometimes lead to instabilities or crashes with certain reference data types.
      • Unwired I32 Error - This test identifies subVI calls that have unwired error outputs, where the error terminal is an I32 instead of an error cluster. In order to implement effective error handling, you should wire this error output to a function like Error Cluster from Error Code.vi, and handle the resulting error cluster.
  • Complexity Metrics
      • Cyclomatic Complexity - Checks that the cyclomatic complexity for the block diagram is below the user-specified limit. The cyclomatic complexity measures the number of linearly independent paths in the block diagram code. It gives an indication on the amount of branching in the code and subsequently the recommended number of tests for the VI.
      • Depth of Nesting of Structures - Checks that the nesting of structures is within the user-specified limit.
      • Fan In - This test checks if the number of VIs calling this VI is less than the user specified number.
      • Fan Out - This test checks if the number of SubVIs called by a given VI is less than the configured value.
      • Modularity Index - Checks that the Modularity Index for the VI is above the user-specified limit. The Modularity Index measures the ratio of number of SubVIs vs total nodes in the block diagram excluding the terminals of front panel objects. It gives an indication of how Modularized the VI is. It is desireable to have larger value for Modularity Index.
  • Documentation
    • Developer
      • Approved Bookmark Tags - Verifies that the only bookmarks used in the code are from the approved list specified in the configuraiton for this test.
      • Comment Usage - Checks whether the block diagram contains a minimum user-specified number of comments. The test also can check whether all subdiagrams of multiframe structures, such as Case, Event, and sequence structures, contain at least one comment.
      • Label Call Library Nodes - Checks Call Library Function Nodes on the block diagram for labels. You can improve the readability of a VI by using the label of a Call Library Function Node to describe the function you are calling in a shared library. The test fails if a Call Library Function Node has no label or the default label.
      • Revision History - Checks for revision history comments. Clear the revision history when you complete a VI so users cannot see developer comments.
    • User
      • Spell Check - Checks the spelling of words on a VI's front panel and block diagram.  Certain VI properties, such as description, are also checked.
      • VI Documentation - Checks for text in the VI description, control description, and/or tip strip fields on all controls.
  • Front Panel
    • SubVI
      • Array Default Values - Checks charts, graphs, and arrays on a front panel for empty default values. Saving non-empty default values inside charts, graphs, or arrays uses memory unnecessarily. When the VI runs, it overwrites values wired to indicators on the block diagram. If the VI is used as a subVI, the VI overwrites values wired to controls connected to the connector pane.  This test will not check graphs and charts that are not array datatypes (this includes scalar Waveform Charts and Digital Waveform Graphs).  It will also ignore fixed-size arrays.
      • Cluster Sized to Fit - Checks that front panel clusters are set to Size to Fit, Arrange Horizontally, or Arrange Vertically. If you do not select one of these autosizing options, cluster objects might not be visible to the user. This test ignores error clusters.
      • Control Alignment - Checks that the alignment of controls on the front panel roughly matches the alignment of controls on the connector pane.
    • User Interface
      • Alignment Grid Setting - Checks whether the size of the alignment grid squares on the front panel of the VI matches the value specified in the test configuration. The test optionally checks whether the size of the alignment grid squares on the block diagram of the VI matches the value specified in the test configuration.
      • Clipped Text - Checks that any visible text on the front panel is not cut off. This includes text in control labels, control captions, free labels, and text controls such as strings and paths. The test cannot check the text inside listboxes, tables, tree controls, and tab controls.
      • Dialog Controls - Checks that front panel controls are from the System palette. The test ignores controls that do not have a dialog counterpart.
      • Duplicate Control Labels - Checks that controls on the front panel do not share the same label.
      • Empty List Items - Checks listbox, multicolumn listbox, table, and tree controls to ensure that they are empty. The contents of these controls populate when a VI runs, so saving a VI with contents in these controls uses memory unnecessarily.
      • Font Usage - Checks that front panel controls, indicators, and free labels use user-specified fonts, such as application, system, or dialog fonts.
      • Overlapping Controls - Checks that front panel controls and indicators do not overlap. The test does not analyze front panel decorations.
      • Panel Size and Position - Checks that a front panel completely resides within the bounds of the screen. The test also checks whether the front panel is larger than the maximum specified width and height. If you are using a multi-monitor system, the test fails if the panel does not reside entirely within the bounds of the primary monitor. This test works only on standard, control, and global VIs.
      • Scalar Chart Updates - This test checks for Waveform Chart indicators with individual updates.  You can minimize the number of front panel updates by passing array data instead of scalar data to the chart terminal.
      • Synchronous Display - This test checks for the "Synchronous Display" setting on controls and indicators.  Enabling Synchronous Display causes the control or indicator to redraw every time its value is updated on the diagram. This rapid updating is not required in most applications.
      • Transparent Labels - Checks that free labels, control labels, and control captions all have transparent backgrounds.
  • General
    • File Properties
      • SubVI and TypeDef Locations - Checks that subVIs and TypeDefs reside in one of an arbitrary number of user-specified locations (paths and LLBs). If you do not specify a location, the test passes. The test does not check Express VIs on a block diagram.
      • VI Extension - Checks the filename extension. The test fails for any VI that does not have a .vi or .vit extension, or for any custom control that does not have a .ctl or .ctt extension. The test is case insensitive.
      • VI Name - Checks the name of a VI for potentially invalid characters.
      • VI Saved Version - Checks that the VI is saved in the most current version of LabVIEW.
      • VI Size - Compares the file size of a VI to the maximum allowable size the user specifies.
    • Icon and Connector Pane
      • Connector Pane Alignment - Checks that inputs wire to connector pane terminals on the left side and that outputs wire to connector pane terminals on the right side.
      • Connector Pane Pattern - Checks that the connector pane pattern, regardless of rotation, matches one of the user-specified connector pane patterns.
      • Default Icon - Checks that the icons of Standard and Polymorphic VIs are neither default nor empty.
      • Error Style - Checks that error connections appear in the lower-left and lower-right corners of the connector pane. This part of the test runs only if the connector pane wires a single error in and a single error out terminal. The test also checks whether an error case appears around the contents of the block diagram.
      • Full Connector Pane - Checks that the connector pane is not full.  Your VI should have extra connector pane terminals available for future expansion.
      • Icon Size and Border - Checks that the icon image is 32 × 32 pixels in size and has a solid border. The test does not check the icons of control or global VIs.
      • Polymorphic Terminals - Checks that terminals on all instances of a polymorphic VI appear in the same position on the connector pane of the instance VI. The test does not analyze broken polymorphic VIs.
      • Terminal Connection Type - Checks that controls and indicators on the connector pane that match user-specified names or patterns include the user-specified terminal connection type, such as required, recommended, or optional.
      • Terminal Positions - This test checks controls and indicators connected to a VI's connector pane for user-specified names or patterns at certain positions.
    • VI Properties
      • Auto Error Handling Enabled - Returns a failure for any VI with Automatic Error Handling enabled. Note that if you wish to only check VIs that have unwired error terminals that may trigger automatic error handling dialogs, consider using the Block Diagram > Warnings > Error Cluster Wired test instead.
      • Broken VI - Checks for broken VIs.
      • Built Application Compatibility - Checks for properties or methods that are not supported in built applications.  Run this test on any VIs you want to build into an application to ensure they will function properly.
      • Driver Usage - Checks for subVIs, functions, or Property Nodes that are part of National Instruments driver software packages.  This test does not check for Express VIs that are part of the driver software packages.
      • Platform Portability - Checks for potential problems that might occur when you attempt to port a VI from one operating system to another.
      • Removed Diagram - Checks whether the block diagram is present. Do not remove a block diagram from a VI because you cannot recover it. You can password protect a VI if you do not want users to view the block diagram.
      • Separate Compiled Code Setting - Checks if the 'Separate compiled code from source file' setting of a VI matches the test configuration. The test returns a failure if the VI setting matches the test configuration.
      • Toolkit Usage - Checks whether subVIs are National Instruments LabVIEW toolkit VIs. When you distribute a VI that includes toolkit VIs as subVIs, each computer that runs the VI must have the toolkit VIs installed or the VI does not run correctly.
      • VI Lock State - Checks the lock state of a VI against the user-specified lock state(s).
  • VI Metrics
      • Connector Inputs and Outputs - Checks that the number of controls and indicators on the connector pane is within the user-specified range.
      • Controls and Indicators - Checks that the number of controls and indicators are within the user-specified limits.
      • Diagram Count - Checks that the number of diagrams on the block diagram is within the user-specified limit.
      • Diagram Size - Checks that the block diagram size is within the user-specified maximum width and height. Block diagrams that have a large area require a lot of scrolling to read the code.
      • Node Count - Checks that the number of nodes on the block diagram is within the user-specified limit.
      • Property Reads and Writes - Checks that the number of Property Reads and Property Writes is within the user-specified limit.
      • Shared Library Calls - Checks if the number of Shared Library Calls is within the user-specified limit.
      • Structure Count - Checks that the number of structures on the block diagram is within the user-specified limit.
      • Wire Sources - Checks that the number of wire sources on the block diagram is within the user-specified limit.
Contributors