07-24-2008 08:35 AM
07-25-2008 03:11 PM
07-28-2008 12:36 PM
Rod,
I'm using Visual Basic in Visual Studio 2005 with .NET Framework 2.0.
It appears from NI's documentation that the C function "DAQmxGetSysDevNames" provides the same functionality as the Visual Basic method "DAQSystem.Local.Devices". Both obtain a string array of MAX-recognized device names.
NI provides a sample VB solution, ListDevices.2005.sln, which uses DAQSystem.Local.Devices. When I ran this sample, I got the erroneous results. Unfortunately, I couldn't find a matching sample using the C library, so I recruited my C++ counterpart here to create and run a test using DAQmxGetSysDevNames. The results are the same.
At this point I'm getting the same results on 4 different units using two different languages. The PXI-4071 never appears! Could this be a bug in the latest NI-DAQmx or NI-DMM software?
James
07-29-2008 04:03 PM
07-30-2008 07:46 AM
07-31-2008
02:59 PM
- last edited on
08-15-2025
08:35 AM
by
Content Cleaner
Howdy James,
Since DMM drivers act more like instruments than DAQ devices, you will need to make a call to the NI-ModInst API to retrieve the device models and corresponding device names for your modular instruments (DMM's, FGen's, Scopes, etc). In LabVIEW the niModInst Get Installed Device Attribute.vi can accomplish this; the equivalent function in C is niModInst_GetInstalledDeviceAttributeViString().
References:
KB 3KK599LE: Using NI-ModInst to Query Device Specific Information
NI-ModInst Help (located at \labview\help\niModInst.chm)
Message Edited by pBerg on 07-31-2008 03:00 PM
07-31-2008 05:44 PM
pBerg,
Thanks a million for pointing me in the direction of NIModInst (instead of NI-DAQ). It works and my problem is solved.
The sample VI's are in LabVIEW and I use Visual Basic, so I had to dig a little to find the DLL calls I needed. (The sample VIs' block diagrams are password protected - usually I just look at the parameters of a DLL call node.) It didn't take long to find the info I needed on the NI web site. The DLL is NIModInst.dll in the IVI\bin folder.
niModInst_OpenInstalledDevicesSession opens a session.
niModInst_GetInstalledDeviceAttributeViString gets the name, model and S/N of a device.
niModInst_CloseInstalledDevicesSession closes the session.
There's more, but that's all I need for now. I'm a happy camper - although I still wonder how this gets to be problematic when it's supposed to be easy?
James
08-01-2008
03:31 AM
- last edited on
08-15-2025
08:36 AM
by
Content Cleaner