LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB address to VISA source name

Solved!
Go to solution

Hi everyone,

do anybody know how to convert the GPIB address to VISA resource name, for exampl I stored the address 20 in a .txt file, In labview I want read the address 20 and config it to a VISA resource name,like GPIB0::20::INSTR.so the VISA  Write.VI Can use the address.

how to develop code to do this?

thanks in addvance.

 

 

0 Kudos
Message 1 of 3
(3,015 Views)
Solution
Accepted by topic author jiaquwll

You might have some luck using the VISA Find Resource node. 

This will return all the resources that match specific patterns (and you can create a pattern to describe your existing GPIB address, perhaps) and then you can pass the resources to VISA Open, for example.

 

Copying from the bottom of the "Detailed Help" for the function:

VISA Find Resource Details

LabVIEW lists resources in an I/O control according to the chosen I/O control class type and the Filter VISA Names dialog box, so you might not need to call this function.

All resource strings returned by this function are recognized by VISA Open. However, this function does not necessarily return all strings that you pass to the VISA Open function. This is especially true for network and TCP/IP resources. If a resource does not appear in the list, you can explicitly add the resource in the NI-VISA configuration utility, such as (Windows) Measurement & Automation Explorer, (Linux) visaconf, or (Mac OS X) NI-VISA Configuration. The configuration utility also has options that expand or limit the set of resources that this VI returns.


GCentral
0 Kudos
Message 2 of 3
(2,969 Views)

Hi Cbutcher,

thanks a lot, that is what I want, I works very well.

0 Kudos
Message 3 of 3
(2,933 Views)