Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

-200088 Error with PCIe-6363 and DAQmx v9

Dear All,

 

I had been programming a PCI-6259 card using DAQmx v8.3. My application was in the form of a GUI developed in Matlab (2009a). The callbacks of the GUI call DAQmx library from Matlab, and have the PCI-6259 do some tasks (in particular simultaneous control of a piezostage and 2 APD's). This program worked nicely with PCI-6259 and DAQmx v8.3.

 

Then for some other reasons we had to switch to a different card, PCIe-6363. The new card arrived with DAQmx v9.0.2 DVD, and I did the installation exactly as described in the instructions (I first uninstalled everything from NI, then installed the new DAQmx DVD with the typical settings, and finally inserted the card). I was expecting that my program would also work with this card/DAQmx. But unfortunately I am getting -200088 errors. When I call DAQmxCreateTask, I don't get any error (ec=0), but all the tasks are assigned the same TaskHandle, which I don't find meaningful. And when I try to introduce channels into my tasks (using DAQmxCreateCICountEdgesChan for example), I get the -200088 error. I checked the card from MAX, and worked fine. I have also tried versions 9.1.1 and 9.2.0 of DAQmx. The latest driver date I tried for the PCIe-6363 is 22.07.2010. The card appears as Dev1 in the MAX, so I also use Dev1 in my programs.

 

Thank you very much in advance for your valuable comments.

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

Hello,

 

Check out this thread here for a possible workaround.  Seems like a related issue to the program you are working with rather than the driver.  If that workaround does not work for you, try repairing or reinstalling the DAQmx driver and see if you get the same results.

 

Found more information about this here and here.

Kyle A.
National Instruments
Senior Applications Engineer
0 Kudos
Message 2 of 3
(3,493 Views)

Dear Kyle,

 

Thank you very much for your reply. The threads you suggested were extremely useful. As described there, we must send empty pointers as the input of DAQmxCreateTask function. I write below some details:

 

My previous code (This was working with PCI-6259, DAQmx8.3, and Matlab2009a):

 

Counter0TaskHandle=uint32(1); Counter0TaskHandle_ptr = libpointer('uint32Ptr',Counter0TaskHandle);
[ec,taskName,Counter0TaskHandle] = calllib('nicaiu','DAQmxCreateTask','',Counter0TaskHandle_ptr)

Counter1TaskHandle=uint32(1); Counter1TaskHandle_ptr = libpointer('uint32Ptr',Counter1TaskHandle);
[ec,taskName,Counter1TaskHandle] = calllib('nicaiu','DAQmxCreateTask','',Counter1TaskHandle_ptr)

DAQmx's reply with my new setup (PCIe-6363, DAQmx9.2, and Matlab2009a):

 

ec =0
taskName =''

Counter0TaskHandle =1843221600

ec =0
taskName =''
Counter1TaskHandle =1843221600

 

So, although I get ec=0, I also get the same handle for distinct tasks. The handles were unique, several digit (I don't remember the exact number) integers with my old setup. And when I continue I get the -200088 error with any function related to these tasks. For example:

 

DAQmx_Val_Rising = int32(10280); initialCount = uint32(0); DAQmx_Val_CountUp =int32(10128);
ec = calllib('nicaiu','DAQmxCreateCICountEdgesChan',Counter0TaskHandle,'/Dev1/ctr0','', DAQmx_Val_Rising, initialCount, DAQmx_Val_CountUp)

 

results in:

 

ec =-200088

My code now:

 

Counter0TaskHandle=uint32([]); Counter0TaskHandle_ptr = libpointer('uint32Ptr',Counter0TaskHandle);
[ec,taskName,Counter0TaskHandle] = calllib('nicaiu','DAQmxCreateTask','',Counter0TaskHandle_ptr)

Counter1TaskHandle=uint32([]); Counter1TaskHandle_ptr = libpointer('uint32Ptr',Counter1TaskHandle);
[ec,taskName,Counter1TaskHandle] = calllib('nicaiu','DAQmxCreateTask','',Counter1TaskHandle_ptr)

 

DAQmx's reply with my new setup (PCIe-6363, DAQmx9.2, and Matlab2009a):

 

ec =0
taskName =''

Counter0TaskHandle =libpointer

ec =0
taskName =''
Counter1TaskHandle =libpointer

 

So I cannot see the values of the handles, but they are unique, and subsequent functions related to the tasks no longer give the -200088 error. In short, my program works. It required one more modifictaion though: For the functions that give more than 1 output, I need to use an additional (dummy) variable to extract the outputs in the correct order.For example:

 

I was using

[ec,readArray,sampsPerChanRead]=calllib('nicaiu','DAQmxReadCounterU32',Counter0TaskHandle,numSampsPerChan,timeout,readArray_ptr,arraySizeInSamps,sampsPerChanRead_ptr, reserved);


I had to modify this as

[ec,d,readArray,sampsPerChanRead]=calllib('nicaiu','DAQmxReadCounterU32',Counter0TaskHandle,numSampsPerChan,timeout,readArray_ptr,arraySizeInSamps,sampsPerChanRead_ptr, reserved);

My dummy varible, d, is returned as libpointer.

 

Consequently, I have a working program, but the way I call DAQmx functions with >1 output does not exactly match the signature advertised in DAQmx C Reference Help. This can be an issue for future changes (like different cards, versions, etc), but I am satisfied with my current state.

 

Thank you again for your help.

 

Best regards,

 

MYY

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