06-05-2009 12:08 PM
I'm trying to configure an NI6704 for current output. All calls to AO_Configure and AO_Write (with a valid device and channel) return -10461. Is there a way to tell if other processes are using the card?
The NI Test Panel seems to communicate just fine with the NI6704.
Tried rebooting the PC in case there were some other processes using the card. That didn't help.
Noticed that there are several NI processes started when the PC reboots. Maybe one of these is causing a conflict.
The processes are:
nidevmon.exe
nidmsrv.exe
niLxiDiscovery.exe
nimdnsResponder.exe
nimxs.exe
nipalsm.exe (there are 3 instances of this application)
nisvcloc.exe
Recently downloaded and installed NI-DAQmx 8.9 to solve a different problem. That solved another problem and allowed us to get to the point of making the AO_Configure call. We have successfully made this call on separate PC with a separate NI6704 in the past.
Here is the code:
short iDevice = 1;
short iChan = 0;
for (iChan = 16; iChan <= 31; iChan++) {
iStatus = AO_Configure(iDevice, iChan, 1, 0, 10.0, 0);
printf("Status dev=%d chnl=%d status=%d\n", iDevice, iChan, iStatus);
}
iStatus always equals -10461 (resourceReservedError - The specified resource is unavailable because it has already been reserved by another entity.)
Thanks for any ideas.
06-08-2009 04:08 PM
This device is supported by both Traditional NI-DAQ (driver that you seem to be using - AO Group Config.VI) and NI-DAQmx. When you call NI Test Panels, it calls into the NI-DAQmx Driver and associates your NI-6704 DAQ card with the NI-DAQmx. When you run your text-base code you are calling into the Traditional NI-DAQ(Legacy driver). You are getting this error because you are trying to call into the 6704 using the NI-DAQ (legacy) Driver but it has been reserved by NI-DAQmx. So either rework your program to use NI-DAQmx calls or reset your device driver as outlined in the following KB http://digital.ni.com/public.nsf/allkb/8883F988DA7A618186256D21004AAF24?OpenDocument
In summary either stick with one driver (DAQmx or Traditional NI-DAQ), or make sure to reset the driver everytime you want to switch between the two.
Let us know if this helps!
06-18-2009 08:24 AM
I changed the program to use the NI-DAQmx functions and that solved the problem.
Thanks again for the help!
Steve