LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Find function to VISA Resource Name

Hi,

Can anyone help me with this VISA question. I'm kind of new to
instrument control, but have been using LV for quite a long time. I'm
using version 6.02. I discovered the VISA Find Resource function, and
thought it would be really neat to find the instruments that are sitting
on my GPIB bus, and then make sure they are the ones I need for my
testing. The Find resource works great, and returns an array of strings
that are the resource names of the instruments. i.e. GPIB0::5::INSTR.
However, the VISA Open (and all the other VISA functions) require a VISA
resource name control (One of those pruple doohickies with I/O in it).
I haven't been able to figure out how to get that string from the find
function into the VISA resou
rce name control (It looks like a pulldown
on the front panel) so that I can do a *IDN? query to find out what
instrument is actually at this address. I've tried property nodes, even
looked at the invoke node, but to no avail. By the way, the property
node DID have the VISA resource name, but it was read only.

Thanks in advance for any help you folks might be able to provide.

David Dupont
Airvana Inc. http://www.airvananet.com
0 Kudos
Message 1 of 4
(3,022 Views)
David:

This issue was solved in LabVIEW 6.1 and there it works exactly as you expect. Fortunately, there is a workaround in LabVIEW 6.0.x.

Just create a local variable from an I/O control and assign the string to it. This will assign the string value (resource name) into the VISA I/O control, and then you can use it on the other VISA functions.

Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments
Message 2 of 4
(3,023 Views)
Perfect. Thanks. David Dupont

Dan Mondrik wrote:

> David:
>
> This issue was solved in LabVIEW 6.1 and there it works exactly as you
> expect. Fortunately, there is a workaround in LabVIEW 6.0.x.
>
> Just create a local variable from an I/O control and assign the string
> to it. This will assign the string value (resource name) into the
> VISA I/O control, and then you can use it on the other VISA functions.
>
> Dan Mondrik
> Senior Software Engineer, NI-VISA
> National Instruments
0 Kudos
Message 4 of 4
(3,023 Views)
Hello, David!

I'll do my best to answer your question.

In LabVIEW 6, you have to assign VISA aliases in Measurement and Automation Explorer. You can assign meaningful VISA Aliases to your instruments that you control using VISA in the Devices and Interfaces section in Measurement & Automation Explorer. The aliases can be used in your LabVIEW application development to refer to your instrument.

Once you have assigned aliases in MAX, you simply place a VISA Resource Name Constant in your block diagram. Type the alias name into the resource name constant and wire the name constant to the VISA Resuorce Name input of the VISA Write and VISA Read functions to control your instrument.

I hope this helps.

Mark Ridgley
0 Kudos
Message 3 of 4
(3,022 Views)