05-12-2011 12:19 AM
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!
05-12-2011 06:20 AM
Hi,
Have you read this?
http://digital.ni.com/public.nsf/allkb/46F78EDD19BA0CC386256CEE007201FC?OpenDocument
- George -
05-12-2011 05:26 PM
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
05-12-2011 06:07 PM - edited 05-12-2011 06:07 PM
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
05-12-2011 07:21 PM
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
05-13-2011 01:05 AM
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
05-13-2011 02:34 AM
Check this out:
http://digital.ni.com/manuals.nsf/websearch/950A4461A97A0393862569F2005E3E9C
- George -
06-09-2011 03:45 AM
Thanks and apologies for my so late response
--
Neppie