VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable a Custom Device in VeriStand

Thanks for reading this. 

I am developing a Custom Device for VeriStand. I would like to add the option to enable/disable the Custom Device in the System Definition File, but so far it seems to work only cosmetically and not really disable the CD when the SDF is deployed.

 

In the CD's XML file, I am using a Run Time Menu with two choices (Enable, Disable). It  then toggles between two different Pages and Glyphs (one for Enabled, one for Disabled). With this, I am able to "cosmetically" enable and disable the Custom Device as viewed in the System Explorer.

In the XML file, Item2Launch for the RunTimeMenu calls a VI that sets the subvi "NI VeriStand - Update Custom Device Flag.vi" shown below to True (enabled) or False (disabled).
Update CD Flag.PNG

But I find that this is only working cosmetically. If I disable the CD and deploy the SDF, it seems like it is enabled and running. Its channels are all active in the Workspace.

So I don't know what the "NI VeriStand - Update Custom Device Flag.vi" actually does. Its Help documentation says "It flags the custom device as active or inactive". How is the information actually used by VeriStand when it deploys the System Definition File? Is there another VI I could use to disable the CD on deployment?

 

 

0 Kudos
Message 1 of 3
(2,903 Views)

Hi RagMan,

 

I would recommended looking at the source of another custom device that incorporated an enable/disable functionality. One that I know of is the Ballard Arinc-429 Custom Device. This custom device has a right-click menu option to disable/enable it. If you download the source code you can look at the EnableDisable Right click VI to see how they implemented it.

 

Ballard Arinc-429 System Explorer.lvlib_EnableDisable - Right Click_BD.png

 

As you can see, they did use the same Update Custom Device Flag.vi.

 

-Jordan

Message 2 of 3
(2,873 Views)

Hi Jordan

Thanks for replying to my post. I looked at the code for the ARINC 429 custom device as you suggested. I saw the Enable/Disable code in the System Explorer code, but I could not find its counterpart for Enabling/Disabling in the RT Driver code. So my guess is VeriStand is handling the enable/disable when it deploys the code (as it should be). But in my case it is not working. Only workaround I have is to add a channel or property in my Custom Device to keep the Enable/Disable flag, and in the RT Driver code, use that to disable the Init, Execute, and Shutdown VIs. This is not preferable since the disabled CD's channels will still show in the Channel selection dialogs but it will otherwise work.

Thanks again

 

Raghu

Certified LabVIEW Developer (since 2005)
LabVIEW Developer since Version 2.0
0 Kudos
Message 3 of 3
(2,835 Views)