Implementing Disable Function in VeriStand Custom Device

Updated Jun 10, 2026

Environment

Software

  • VeriStand
  • VeriStand Custom Devices

You can extend the functionality of VeriStand by developing custom devices in LabVIEW.

If you encounter problems deploying and running a custom device after incorporating it into a VeriStand project, temporarily disabling the custom device may be useful for debugging purposes. However, this functionality is not built in and must be added during development in LabVIEW.

This article will show you how to implement temporary disable functionality for custom devices.

To temporarily disable functionality for your custom device, follow these steps:

  1. Prepare two GUIDs, one for the main page of the custom device and one for the main page when disabled. Usually, GUIDs are collected as global variables in Constants.vi in <custom device name> Shared.lvlib, which is prepared in the program template created by the custom device template wizard. As shown in the figure below, label the GUID for the original main page as Enabled and the GUID for the main page when disabled as Disabled, so that it will be easier to distinguish them when used later.



  2. Create a program to disable, EnableDisable Main Page.vi. Create this vi under <custom device name> System Explorer.lvlib. In the following image, create a virtual folder called RTM and create EnableDisable Main Page.vi in it.



    The contents of this VI are configured as follows. The two global variables use the Constants.vi that we just edited.



    In addition, the input to Get Item GUID.vi will have a label name of Item Ref in when you right-click the function to create a control, but change the name to Node Ptr . Also, set this Node Ptr in the connector pane of this VI.
  3. Edit the XML file of the custom device. The content to be edited is between <Page> and </Page>, which defines the settings for the main page of the custom device. If you want to set a run-time menu (RTM) for the main page, set this RTM first.
    The following script is an example of the main page configuration export function implemented as RTM. However, please change the GUID and Path to match the actual custom device.
    Note : The GUID you specify here is different from the GUID for Disabled specified in Constants.vi.

     <RunTimeMenu> <MenuItem> <GUID>781DB2B2-9018-4704-A40D-3FC0CEE746FF</GUID> <Type>Action</Type> <Execution>silent</Execution> <Name> <eng>Export Confiugration</eng> <loc>Export Configuraiton</loc> </Name> <Item2Launch> <Type>To Common Doc Dir</Type> <Path>Custom Devices\MyDemoCustomDevice\Windows\MyDemoCustomDevice Configuration.llb\Export Configuration RTM.vi</Path> </Item2Launch> </MenuItem> </RunTimeMenu>

     

    Add an additional MenuItem to this RunTimeMenu and add the EnableDisable Main Page.vi that you created earlier as the menu content so the complete configuration example looks like this:

     <RunTimeMenu> <MenuItem> <GUID>781DB2B2-9018-4704-A40D-3FC0CEE746FF</GUID> <Type>Action</Type> <Execution>silent</Execution> <Name> <eng>Export Confiugration</eng> <loc>Export Configuraiton</loc> </Name> <Item2Launch> <Type>To Common Doc Dir</Type> <Path>Custom Devices\MyDemoCustomDevice\Windows\MyDemoCustomDevice Configuration.llb\Export Configuration RTM.vi</Path> </Item2Launch> </MenuItem> <MenuItem> <GUID>3ABDE213-0100-48AF-943E-DC6BC91B7105</GUID> <Type>Separator</Type> <Name> <eng>.</eng> <loc>.</loc> </Name> <Item2Launch> <Type>Absolute</Type> <Path>.</Path> </Item2Launch> </MenuItem> <MenuItem> <GUID>8CB32603-DEFF-4D13-AC29-0B37A7489FC0</GUID> <Type>Action</Type> <Name> <eng>Disable</eng> <loc>Disable</loc> </Name> <Item2Launch> <Type>To Common Doc Dir</Type> <Path>Custom Devices\MyDemoCustomDevice\Windows\MyDemoCustomDevice Configuration.llb\EnableDisable Main Page.vi</Path> </Item2Launch> </MenuItem> </RunTimeMenu>

     

    Add the above content within the <Page> and </Page> for your main page.

     

  4. Copy all the contents of <Page> and </Page> for the main page (including the <Page> and </Page> tags), including the content added above, and paste them after the </Page> of the main page. Then, change the GUID for Main Page.vi to the content prepared for Disabled in Constants.vi , and change the notation of Menu Item from Disable to Enable .
    An implementation example is as follows:

     <Page> <Name> <eng>MyDemoCustomDevice</eng> <loc>MyDemoCustomDevice</loc> </Name> <GUID>EDB123ED-3402-491F-B0A0-FDD011A782D5</GUID> <Glyph> <Type>To Application Data Dir</Type> <Path>System Explorer\Glyphs\EditDelete.png</Path> </Glyph> <Item2Launch> <Type>To Common Doc Dir</Type> <Path>Custom Devices\MyDemoCustomDevice\Windows\MyDemoCustomDevice Configuration.llb\Main Page.vi</Path> </Item2Launch> <RunTimeMenu> <MenuItem> <GUID>781DB2B2-9018-4704-A40D-3FC0CEE746FF</GUID> <Type>Action</Type> <Execution>silent</Execution> <Name> <eng>Export Confiugration</eng> <loc>Export Configuraiton</loc> </Name> <Item2Launch> <Type>To Common Doc Dir</Type> <Path>Custom Devices\MyDemoCustomDevice\Windows\MyDemoCustomDevice Configuration.llb\Export Configuration RTM.vi</Path> </Item2Launch> </MenuItem> <MenuItem> <GUID>3ABDE213-0100-48AF-943E-DC6BC91B7105</GUID> <Type>Separator</Type> <Name> <eng>.</eng> <loc>.</loc> </Name> <Item2Launch> <Type>Absolute</Type> <Path>.</Path> </Item2Launch> </MenuItem> <MenuItem> <GUID>8CB32603-DEFF-4D13-AC29-0B37A7489FC0</GUID> <Type>Action</Type> <Name> <eng>Enable</eng> <loc>Enable</loc> </Name> <Item2Launch> <Type>To Common Doc Dir</Type> <Path>Custom Devices\MyDemoCustomDevice\Windows\MyDemoCustomDevice Configuration.llb\EnableDisable Main Page.vi</Path> </Item2Launch> </MenuItem> </RunTimeMenu> </Page>

     

  5. After editing the XML file, build the custom device and add it to the VeriStand project.

If you right-click on the custom device for the XML file configured with the above content, the runtime menu will be displayed as shown below.