01-23-2015 09:51 PM
The VISA header defines constants for each interface type. But if a use has a passport driver installed, the intfType value from viParseRsrc might return a different, unknown value. Is there a way to query these values and the interface type prefix or the library to which they belong? In other words, is there a function that can be used to obtain a table like:
"gpib" -> 1
"vxi" -> 2
...
"some new thing" -> 101
01-26-2015 08:20 AM
Hello HEG.
Thanks for using the NI forums. Could you please describe your issue in a better way? What VI are you using? What are the parameteres that youre sending? Please be more specific.
Regards.
-- Luis C
01-26-2015 08:36 AM
Thanks for answering. I am not using any VI, just calling the VISA library from C. As I mentioned, when you call the viParseRsrc function, the intfType value tells you about the interface type of the resource. The posible values are defined in "visa.h":
#define VI_INTF_GPIB (1) #define VI_INTF_VXI (2) #define VI_INTF_GPIB_VXI (3) #define VI_INTF_ASRL (4) #define VI_INTF_PXI (5) #define VI_INTF_TCPIP (6) #define VI_INTF_USB (7)
But if you have another inteface type supported within VISA using an external library through and visible in NI-MAX the the intfType value is not in this list.
The question is: how you can know which are the valid values in a particular instalation and how can you relate them to the resource name?
Thanks,
Hernan
01-26-2015 09:19 AM
01-26-2015 09:53 AM
Those are the supported types by default. If you install another passport, new types are supported. For those of you unfamiliar:
"A passport is a plug-in library module that handles the communications with a class of instruments. NI-VISA includes passports for GPIB, serial, TCPIP, FireWire, USB, etc. The passports visible to your installation of NI-VISA can be found in the VISA Options section of National Instrument’s Measurement and Automation Explorer application.""
For example after you have installed the Lecroy VICP paper: "VICP::<ip address>::INSTR" becomes a valid resource name and gets assigned a different interface type value. See for example: http://teledynelecroy.com/doc/understanding-vicp-and-the-vicp-passport
My question is how to query these new interface type values.
01-26-2015 09:58 AM
01-26-2015 10:15 AM
Hello All,
The TeledyneLeCroy Passport uses TCP/IP and the VISA resource will be in form of: VICP::<IP Address of scope>
Here is a link to an application brief that has more information: Understanding VICP and the VICP Passport
If you set the scope up as an LXI(VXI11) interface, you can just use the traditional resource: TCIPx::<IP Address>::inst0::INSTR
I hope this helps!
Regards,
Leonard Brown
Applications Engineer
TeledyneLeCroy
01-26-2015 10:20 AM
Hi Leonard,
Thanks for your response. My question was not really pointed to the Lecroy but was more general. How do you query installed passports and the interface type values from a NI-VISA installation.
best,
Hernan
01-26-2015 10:46 AM
Hello Hernan,
OK, sorry. I do not see a way to do this when using a passport either.
Regards,
Leonard Brown
Applications Engineer
TeledyneLeCroy