From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
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 - edited 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