NI VirtualBench Users

Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.

How do you programmatically obtain the Device Name for the VirtualBench?

Hi,

I want to know how do you programmatically obtain the Device Name for the VirtualBench?

The reason behind this is that  we prefer to interrogate test equipment for the relevant device name rather than having it fixed in code so as to make the software more robust when for instance a device is swapped out for calibration/repair or someone changes the device name in MAX.

If it was a DAQmx device I could you a property node to obtain the device name but this method will not work with the VirtualBench.

Thanks,

Helen

CLD, CTD
0 Kudos
Message 1 of 4
(2,724 Views)
3 REPLIES

Re: How do you programmatically obtain the Device Name for the VirtualBench?

HelenC wrote:

I want to know how do you programmatically obtain the Device Name for the VirtualBench?

Hi Helen,

VirtualBench devices can be found use the System Configuration API. See my snippet here:

How to get Virtual Bench system name?

http://forums.ni.com/t5/VirtualBench/How-to-get-Virtual-Bench-system-name/td-p/3093257

Joe Friedchicken
NI Modular Instruments Application Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Modular Instruments Application Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2016)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
Message 2 of 4
(1,498 Views)

Re: How do you programmatically obtain the Device Name for the VirtualBench?

You can use the NI System Configuration API to list VirtualBench devices (as well as other NI devices). The Example Finder has an example that might be useful: Hardware Input and Output → System Configuration → Show All Hardware.vi

——
Brandon Streiff
ni.com/virtualbench · ni.com/daq
Message 3 of 4
(1,498 Views)
Highlighted

Re: How do you programmatically obtain the Device Name for the VirtualBench?

Thanks Joe,

I also did the following after discussing the issue with a work mate, this has been improved upon by adding in error trapping for if the device has been turned off using 'Is Present'.

Get VB Device Name Snippet.png

Thank you for your reply,  Helen

CLD, CTD
0 Kudos
Message 4 of 4
(1,498 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.