Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do NI6704 AO_Configure calls always return -10461?

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.

 

 

0 Kudos
Message 1 of 3
(3,170 Views)

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!

Charley Dahan

Global Account Manager
0 Kudos
Message 2 of 3
(3,146 Views)

I changed the program to use the NI-DAQmx functions and that solved the problem.

 

Thanks again for the help!

Steve

0 Kudos
Message 3 of 3
(3,127 Views)