LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving list of available values from IOName/IVILogicalName control

Solved!
Go to solution

Is it possible to programmatically retrieve a list of all the available values from an IOName (or more specifically IVILogicalName in this case) control? I'm talking about the list of values which shows up when you click the drop-down menu arrow of the control. For example, if I set the control to NI-SCOPE (Select IVI Class->IviScope->niScope) the drop-down list only shows the names of scopes that are present (e.g. "PXI2Slot6"), including any "duplicate" sessions (e.g. "PXI2Slot6 (1)").

Example
I can get the currently selected value of the control easily enough but I'd like to get a list of all the available values. Is this possible? The values are right there in the control so surely there must be a way to access them.

My ultimate goal here is to find a way to retrieve all open IVI sessions and then close them. If there is an alternative way to achieve this, I'd be glad to hear it.

Some related posts I've found:
https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Close-all-open-IVI-sessions/td-p/1752560
https://forums.ni.com/t5/Digital-Multimeters-DMMs-and/What-is-the-proper-way-to-close-all-open-sessi...

0 Kudos
Message 1 of 7
(2,005 Views)
Solution
Accepted by ollischr

DropDownList (with VI scripting turned on)

I use this to find niDMM you can edit it to work with niSCOPE by changing the

IVI class of the output array 

Find niDMM.png

I use this for VISA 

Find VISA.png

Omar
Message 2 of 7
(1,949 Views)

Here is a collections of VIs that I use when dealing with niDMM IVI refnum to clean up orphans. Mainly while developing and debugging when I might abort running code.

 

Omar
0 Kudos
Message 3 of 7
(1,945 Views)

@Omar_II wrote:

DropDownList (with VI scripting turned on)

I use this to find niDMM you can edit it to work with niSCOPE by changing the

IVI class of the output array 

Find niDMM.png



Thanks, this works beautifully. 🙂

0 Kudos
Message 4 of 7
(1,922 Views)

Just out of curiosity, how were you able to select this "DropDownList[]" property for the property node? When I create an IVILogicalName property node from scratch, there is no "DropDownList[]" property available in the Select property->Browse menu. Copy/pasting the property node from the example posted above works fine, but even with that one, if I change the property to something else there's no way to change it back to "DropDownList[]". Is there some toolkit requirement for this?

0 Kudos
Message 5 of 7
(1,903 Views)

I'm not sure which one turns it on but it is either 

 

Options/VI Server VI Scripting

"Show VI Scripting functions, properties and methods"

 

or it is the LabVIEW.ini file setting

SuperSecretPrivateSpecialStuff=True

Since the node is brown it must be in the SuperSecretPrivateSpecialStuff

WARNING use at your own risk for it is not officially supported by NI and might change with new versions.

Omar
0 Kudos
Message 6 of 7
(1,894 Views)

I see. The VI scripting option was checked but that super secret .ini value is news to me. I'll try setting that as well. Thanks again.

0 Kudos
Message 7 of 7
(1,891 Views)