Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-6111 does not work unless starting up MAX first

HI,

I am encountering a case which puzzles me.

 

Now I am PCI-6111 with PCI connection of the PC with Windows XP.

The driver versions are: Traditional NI-DAQ 7.4.4, NI-VXI 3.8.0, and NI-VISA 5.0.3.

Control program is written in legacy C++ (based on VC++ 6.0).

 

The control program checks PCI-6111 connection by invoking an DAQ API Get_DAQ_Device_Info(),

but it returns an unexpected value -10401, which means "Unknown Device".

 

However, first the user gets up MAX and then runs the control program, PCI-6111 can be controlled correctly.

Even after shut down the MAX, it can work. Even after reboot, it can.

 

From these observation, I think some MAX does some initalization or driver configuration, and the control program misses either or both.

However, I don't know what MAX does for the drivers at getting up.

 

Could anyone let me know any information about this?

 

Thanks!

0 Kudos
Message 1 of 8
(3,137 Views)
0 Kudos
Message 2 of 8
(3,128 Views)

Thanks George,

 

I have read the page and found an intersting statement:

 

"Another possible reason you might be encountering this error is because you are attempting to use Traditional NI-DAQ (Legacy) Driver functions to communicate with your DAQ device, but the drivers need to be reset to use the device. To reset the drivers for Traditional NI-DAQ, open Measurement & Automation Explorer (MAX) and under Devices and Interfaces, right click Traditional NI-DAQ (Legacy) Devices and select Reset driver for Traditional NI-DAQ. Keep in mind that this is only if you are using the Traditional NI-DAQ drivers.”

 

Can we have the only way to reset the driver by operating MAX manually? Aren't there any ways to do it automatically, i.e., by programming?

 

Thanks,

-- Neppie

0 Kudos
Message 3 of 8
(3,117 Views)

Hi Neppie,

 

The "Reset driver for Traditional NI-DAQ" menu item is actually for making the device available to NI-DAQmx, so I'm not sure it would do what you want (even if it was callable from C). Try Init_DA_Brds().

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 4 of 8
(3,111 Views)

Thanks Brad,

 

However, the code already invokes Init_DA_Brds() on reset process. The reset process invokes Init_DA_Brds, GPCTR_Control (to reset GP Counter), and DAQ_Clear.

 

Regards,

-- Neppie

0 Kudos
Message 5 of 8
(3,107 Views)

Related to the previous question, is there any documents or webpages to help learining APIs of Traditional NI-DAQ, such as API list or help map?

I googled but I could not find helpful information.

 

Thanks,

-- Neppie

0 Kudos
Message 6 of 8
(3,100 Views)
0 Kudos
Message 7 of 8
(3,093 Views)

Thanks and apologies for my so late responseSmiley Happy

 

--

Neppie

0 Kudos
Message 8 of 8
(3,044 Views)