PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Init_DA_Brds does not recognize PXI-6221

Just starting in NI-DAQ land. have PXI chassis with 2 boards. NI utility regocnised both PXI-5620 and PXI-6221, when I tried using Init_DA_Boards API in my C++ program it only recognised PXO-5620. Got an error code back when tried that API on PXI-6221. Error 0xd8eb - "The device is invalid". What gives?
0 Kudos
Message 1 of 4
(3,852 Views)
 

Hello Metrikos,

The PXI-6221 uses our DAQmx driver that is much easier to use and does not recognize Traditional DAQ commands such as Init_DA_Brds. There are many C examples that come with NI-DAQ 7.0 and higher. Go to Add/Remove Programs in the Control Panel and uninstall NI-DAQ. Then install DAQmx. The PXI-5620 requires Traditional DAQ, so download that driver on the same page as well. All of the C example programs can be found at C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C. Please let me know if you have any questions. Have a great day!

Sincerely,

Marni S.

0 Kudos
Message 2 of 4
(3,837 Views)

Well, first - thank you. I suspected that was the case after a bit of searching, but now know for sure.

Now to the original problem - the reason why I used the Init_DA_Boards call was that it allowed me to scan all the boards in PXI chassis and retirned a "handle" to each board. The DAQMX software requires me to supply the board "name" which needs to be obtained from the set up utility. Is there a way to obtain that information in a similar to Init_DA_Boards way, i.e. is there an API which returns board ID? I am using MSVC++ to develop an application, and do prefer to obtain the board IDs for follow up calls during run time, if possible. And while on the subject - if it is NOT possible, for how long the board ID (name) obtained using the "Measurement and Automation" utility is legitimate as far as application program is concerned?

Thank You,

Mark (mark@metrikos.com)

0 Kudos
Message 3 of 4
(3,832 Views)

Hello Mark,

DAQmx requires you to open Measurement and Automation Explorer (MAX), where it gives each device a device number. (You can't do this programmatically.) This device number will remain the same number until it is deleted out of MAX or the device is taken out of the computer. After MAX has been opened and the device number has been assigned, you can check the device number. Take a look at this KnowledgeBase. It is using LabVIEW, but it can be done with C commands. Take a look at DAQmxGetSysDevNames and DAQmxGetDevProductType. Please let me know if you have any questions. Have a great day!

Sincerely,

Marni S.

 
0 Kudos
Message 4 of 4
(3,816 Views)