How to Configure VeriStand Custom Device Upgrades By Version

How to Configure VeriStand Custom Device Upgrades By Version

Adding logic to upgrade NI VeriStand Custom Device versions allows the functionality of a Custom Device to be modified without having to delete and re-add a Custom Device in a System Definition File. This can save a developer time and frustration when working with complicated systems.

How to Add Logic for Upgrading CD Versions

Implementing a basic version of this functionality will require creating two VIs and updating the Custom Device XML.


2. Mutate

a. You can keep adding more Mutate VIs as the Custom Device continues to evolve.

3.    Update Custom Device XML

Veristand add logic for updating CD versions

Implement the “ActionVIOnLoad.VI”

The ActionVIOnLoad executes when NI VeriStand loads a custom device item into memory. Therefore, we can use this VI to check if a new version of a Custom Device has been created. If so, we can implement whatever code is required to update the old version to a new version. An example of a change would be adding or deleting channels, but can really be anything you can fit into your VI.

The first step is to create an instance of the “” in the Custom Device System Explorer

1. Custom Device API.lvlib:NI VeriStand - Get Custom Device

a. Make sure the Custom Device XML version is updated when you build new versions of the Custom Device. 

NI VeriStand custom device system explorer

2. Mutate (See next section).

a. You will typically write a new Mutate VI each time you release a new version of the Custom Device.

3. Custom Device API.lvlib:NI VeriStand - Set Custom Device

Set NI VeriStand Custom Device

Implement “Mutate Version.VI”

This VI is responsible for making the updates from one version to another. This VI should also return the new version of the Custom Device.

NI VeriStand Implement Mutate Version VI

Update the Custom Device XML

The Custom Device XML file must be updated to know that the has been implemented.

1.Add the <ActionVIOnLoad> tag to the Main Page definition.
NOTE: Remember to add this code to both Enabled/Disabled page definitions if that functionality is enabled. 


CAUTION: The <ActionVIOnLoad> must be added before the <ActionVIOnCompile>.

NI Veristand ActionVIOnLoad

NI VeriStand ActionVIOnLoad

Check out these related blog posts:
How to Configure EnableDisable Custom Device Functionality in NI VeriStand
How to Install the “NI VeriStand Custom Device Wizard”

Learn more about DMC's partnership with National Instruments


There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)

Enter the code shown above:

Related Blog Posts