Validating an Existing DQMH Module
Goal
Each DQMH release adds new features and improvements. The Validate DQMH Module utility analyzes a DQMH module and identifies those potential improvements, and in most cases, offers the ability to automatically fix them.
The demonstration video below shows how to upgrade a module.
The validation tool can also be used periodically to check possible inconsistencies in your project’s modules. |
Use the CLI module validation tool to add this step to your CI (Continuous Integration) process. |
Validating a module
-
Go to
-
A prompt will show the available DQMH modules in the current project.
-
Select the DQMH module to validate and hit the OK button to start the validation process
In case of failure detections, the following window is displayed.
Refer to the Module Elements document for a list of required elements in order for an .lvlib to be identified properly as a DQMH module. |
Fixing a failure
Using the fixer
Most of the time validation tests come with a fixer.
If a fixer is available the Fix Issue button is displayed under the failure description.
Hit the Fix Issue button to apply the code modification.
Fix the failure manually
Some failures can’t be fixed automatically. In that case, the failure details explain how to fix the issue.
Ignore validation test
In some cases, it could be useful to ignore a validation test.
-
To ignore a test, right-click on the failure and select the Ignore this Failure item.
-
To enable the validation test again, hit the Manage Ignored Failures… button. Then select the tests to remove from the ignore list in the displayed window.
The tests are ignored at the module level. |
The ignore validation test information is currently stored in a (human-readable) tag in the module .lvlib XML. |
A few tests can be ignored on the VI level. To disable a test only for a VI, include the 'Issue Text' of any validation test failure within the VI Description. To help you write the correct text, you can copy it from the right-click menu in the failure list. Here are the tests you can ignore at a VI level:
|
List of Validation Tests
The following tests are performed by the Validate DQMH Module utility in the latest DQMH version:
-
All Module VI Tagging - Detects any module VIs that are part of the boilerplate module framework, but are not properly tagged as DQMH Framework VIs.
-
Broadcast Folder - Checks to see if the module library contains a 'Broadcast' folder under an 'Arguments' folder.
-
Broadcast Tagging - Detects any broadcast VIs that are not tagged properly with internal tags used for DQMH scripting tools.
-
Broadcast VI Event Icon - Checks to see if broadcast events in the DQMH module have a broadcast event overlay glyph on their icons.
-
Broadcasts Folder - Checks to see if the module library contains a 'Broadcasts' folder.
-
Broken Main - Checks to see if the main VI is broken.
-
Broken Tester - Checks to see if the tester VI is broken.
-
Close Module - Cloneable Race Condition - Detects an obsolete polling mechanism used to close event references in Close Module.vi for cloneable modules. Newer DQMH versions utilize a more robust synchronization mechanism to avoid race conditions when a cloneable module is shutting down.
-
Close Module Error Handling - Detects an obsolete error propagation approach within Close Module.vi.
-
Close Module Update Execution Status - Detects whether or not the Update Module Execution Status.vi is properly called in the Close Module.vi.
-
DQMH 1.0 - Detects whether or not a DQMH module was created with DQMH 1.0. These modules are not compatible with current DQMH scripting tools.
-
Error Cluster in Reply Payload - Detects Request and Wait for Reply payload clusters that do not contain an error cluster as one of the payload parameters.
-
Error Reported Handling DQMH Tags - Checks for obsolete error source processing in the Error Reported broadcast VI.
-
Event Cluster Naming - Detects a scenario where the module request event cluster wired to the Register For Events function in a DQMH Main VI has an unexpected text label.
-
Event Registration Error Output Not Wired - Detects a Register For Events function in a DQMH Main VI that does not have its error output wired.
-
Find Main - Checks to see if a main VI could be found for the DQMH module.
-
Find Multiple Main VIs - Checks to see if multiple VIs are tagged as the main VI for the DQMH module.
-
Find Multiple RT Testers - Checks to see if multiple VIs are tagged as the RT tester VI for the DQMH module.
-
Find Multiple Testers - Checks to see if multiple VIs are tagged as the tester VI for the DQMH module.
-
Find Request and Wait for Reply Events with No Conditional Wait - Detects any Request and Wait for Reply VIs that do not include a 'wait for reply' input.
-
Find Request and Wait for Reply Events with No Module ID - Detects Request and Wait for Reply event VIs within a cloneable module that do not include the Module ID as a reply payload argument. Including the Module ID in the reply payload can help with debugging.
-
Find Request and Wait for Reply Events with No Timeout Error - Detects any Request and Wait for Reply event VIs that do not include code to return an error if the VI times out while waiting for a reply.
-
Find Request and Wait for Reply Timeout Error VI - Detects whether or not the DQMH module has a Request and Wait for Reply Timeout VI.
-
Find Tester - Detects whether or not the DQMH module has a tester VI.
-
Handle Exit Error Handling - Detects obsolete error propagation in the Handle Exit VI. This can cause problems in certain situations involving panel state, particularly if the DQMH module is running under a Real-Time target.
-
Improved Error Reported Frame in Tester - Checks the Tester VI of a DQMH module to see if an obsolete approach is used for processing the Error Reported broadcast event.
-
Incorrectly Reentrant Cloneable VIs - Detects whether or not VIs in a cloneable module that should be non-reentrant have been incorrectly modified to be reentrant. These VIs maintain state, so they must be non-reentrant in order to function properly.
-
Main VI - Exit MHL Frame Needs Error Reported Broadcast - Checks the 'Exit' frame of the Main VI MHL to see if it contains an Error Reported broadcast VI. Older versions of DQMH did not include this code, which could cause errors that occur in the 'Exit' MHL frame to be ignored.
-
Main VI - Panel Close Status Updated - Checks if the Panel Close? event in a DQMH Main VI calls the 'Panel Hidden' broadcast event.
-
Main VI - Reinitialize All to Default - Checks if the Main VI of a DQMH module contains a call to the 'Reinitialize All to Default' method. This method could potentially reset control values that were passed in to the Main VI when it was started by Start Module.vi. If the Main VI is a UI, the DQMH Consortium recommends reinitializing only relevant controls on the panel to default values, as opposed to every control.
-
Missing DQMH VIs - Checks for missing framework-level VIs in a DQMH module.
-
Module Name - Tagged Constant - Checks the diagram of the Module Name—constant.vi in the DQMH module to ensure it has a properly tagged module name string constant.
-
New Module Error Codes - Checks a DQMH module to see if it uses obsolete error code values (500x range) for error code VIs.
-
No Release Queue in Top-Level Error Case - Checks the top-level 'Error' case in a DQMH main VI to ensure there is a Release Queue VI call for the DQMH Message Queue.
-
Non-Reentrant Event VIs - Checks the module library for non-reentrant event VIs. Event VIs may be called from multiple parallel code paths, and since they do not maintain state, they should be reentrant.
-
Non-Reentrant Queue Class Overrides - Checks the reentrancy setting on the VIs in a DQMH Message Queue class to ensure they match the parent class implementation.
-
Non-Reentrant Reset Override - Checks the reentrancy setting on the Reset.vi in a Module Admin child class. The Reset VI must be pre-allocated clone reentrant to match the parent class implementation.
-
Non-Reentrant VIs in Cloneable Module Library - Detects any non-reentrant VIs within a cloneable DQMH module library that should be reentrant to improve performance.
-
Obsolete MHL Frames - Detects the use of obsolete frame names in the MHL. Older versions of DQMH included MHL frames that are no longer used in newer designs.
-
Private Folder Organization - Checks to see if the 'Private' folder in the DQMH module library uses the latest organizational scheme.
-
Request and Wait for Reply Tagging - Detects any request and wait for reply VIs that are not tagged properly with internal tags used for DQMH scripting tools.
-
Request Folder - Checks to see if the module library contains a 'Request' folder under an 'Arguments' folder.
-
Request Tagging - Detects any request VIs that are not tagged properly with internal tags used for DQMH scripting tools.
-
Requests Folder - Checks to see if the module library contains a 'Requests' folder.
-
Required Event VIs - Checks to see if all core framework VIs related to request and broadcast events are present in the module library.
-
Required Nodes - Destroy Broadcast Events - Checks to see if the block diagram of the Destroy Broadcast Events VI contains all named functions that may be accessed when running various DQMH scripting tools.
-
Required Nodes - Destroy Request Events - Checks to see if the block diagram of the Destroy Request Events VI contains all named functions that may be accessed when running various DQMH scripting tools.
-
Required Nodes - Main - Checks to see if the block diagram of the module main VI contains all named functions that may be accessed when running various DQMH scripting tools.
-
Required Nodes - Obtain Broadcast Events - Checks to see if the block diagram of the Obtain Broadcast Events VI contains all named functions that may be accessed when running various DQMH scripting tools.
-
Required Nodes - Obtain Request Events - Checks to see if the block diagram of the Obtain Request Events VI contains all named functions that may be accessed when running various DQMH scripting tools.
-
Required Nodes - Tester - Checks to see if the block diagram of the module tester VI contains all named functions that may be accessed when running various DQMH scripting tools.
-
Semaphores for Singleton - Detects the lack of semaphore synchronization for starting and stopping a singleton module. Newer versions of DQMH include this synchronization to avoid race conditions.
-
Sending Nonexistent Messages - Detects whether or not the Delacor Enqueue Message VI is being used to send messages that do not have a corresponding frame in the MHL of the Main VI.
-
Show Main Diagram on Init - Detects whether or not this module is missing the functionality that allows displaying the Main VI block diagram on code initialization for debugging purposes.
-
Singleton Start Module VI - Proper Open VI Reference Options - Detects whether or not an invalid 'options' parameter is set in the Start Module VI of a singleton module. The correct 'options' parameter value is 0x80.
-
Start Async Call Reference Output Wired - Detects whether or not the reference output of the Start Asynchronous Call function within Start Module.vi is wired. In newer DQMH revisions, this reference cannot be used for reading properties of the Main VI clone instance, and another approach (like using the "This VI" constant) should be used instead.
-
Start Module - Run VI Method - Checks for the use of the 'Run VI' method within Start Module.vi. Newer DQMH versions utilize the Start Asynchronous Call function to improve usability and performance.
-
Stop Module - Cloneable Running as Singleton Polling - Checks for an obsolete implementation of stopping a cloneable module that is running as a singleton. The newer implementation avoids potential race conditions.
-
Stop Module - DQMH 2.1 - Checks for a pre-DQMH 2.1 implementation of the Stop Module VI. Newer DQMH versions use a more robust approach within the Stop Module VI to determine when a singleton module has completed execution.
-
Stop Module - Event Firing - Checks for improper ordering of calls to the Stop Module user event and the Module Did Stop broadcast event within the Stop Module VI.
-
Stop Module - Status Updated Call - Detects if Status Updated.vi is being called within Stop Module.vi. Newer DQMH revisions remove this call, as it is more suitable for developer-intended debugging broadcasts.
-
Stop Module Error Propagation - Checks for obsolete error propagation in the Stop Module VI of a DQMH module. Older DQMH designs would prevent execution of the Stop Module VI on incoming error, while newer designs still have the Stop Module VI execute, even on incoming error.
-
Teardown with Incoming Error - Checks for proper error propagation on the block diagram of the DQMH Unit Test 'teardown' VI.
-
Tester Error Stop Condition - Checks for obsolete loop stop behavior in the Tester VI. Older DQMH designs stopped the main tester loop on error, while newer designs continue execution, but display any error that occurs in an error indicator.
-
Tester Stop Module Case Structure - Checks to see if code needs to be added to the end of a Tester VI block diagram to conditionally call Stop Module.vi only if the module was not running when the Tester VI started execution.
-
U32 Module ID Input - Fixes a bug that was present in older DQMH module templates where the Wait on Module Sync.vi had a U32 value for the Module ID input instead of an I32.
-
Unwired Bundles in Main EHL - Detects any Bundle function within a frame of the DQMH Main VI EHL that has one or more unwired inputs. This is usually an indication that parameters were added to an event, but not wired up in the EHL frame.
-
VI Reference AE - Proper Open VI Reference Options - Detects whether or not an invalid 'options' parameter is set in the VI Reference AE VI of a cloneable module. The correct 'options' parameter value is 0xC0.
-
VIs with Auto Error Handling - Returns a failure for any VI within a DQMH module with automatic error handling enabled. The DQMH framework was designed assuming automatic error handling will be disabled.
-
Wait for Module to Stop for Cloneables - Checks for obsolete 'Wait for Module to Stop' functionality of the Wait on Stop Sync VI in cloneable modules.