Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Alias vs. "Dev1" in NI-DAQmx Base

I believe your original idea of using VISA to detect the long name will work.
This C code segment will extract a list of long names :

viOpenDefaultRM (&RsrcManagerHandle);
viFindRsrc (RsrcManagerHandle, "?*", &FindHandle, &iInstrCount, cInstrDescript);
for (i=0; i {
viFindNext (FindHandle, cInstrDescript);
}

The Find Resource APIs return instrument names in the same order as
the NI-DAQmx Base find utility ("Dev1", "Dev2", etc)

Then use this code to retrieve instrument specific details like Model Name for example:

viOpen (RsrcManagerHandle, cInstrDescript, VI_LOAD_CONFIG, 10, &InstrHandle);
viGetAttribute (InstrHandle, VI_ATTR_MODEL_NAME, cModelName);
0 Kudos
Message 11 of 12
(916 Views)
I've done exactly that but I don't get "Dev1" Instead, I get "USB0::0x3923::0x717A::00E0301C::RAW" which doesn't seem to work with mxBase calls as a device name. If I include viSetAttribute(session, 0x3FFF0190, 2) before the viFindRrsc call then I get the VISA alias. I've tried substituting other integers for the 2 via a 'for' loop but in no instance did I get "Dev1" for the name.

If you did then I'm missing something. My question now is that if LabView can do what I want then what is LabView written in and how does that do it?
0 Kudos
Message 12 of 12
(904 Views)