Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

error handling in DAQmx

It looks there is major problem in combination NI counters hardware and DAQmx software.

Hopefully, a counter in my system is not so critical itself. So if I can't avoid error I would like to teach program to live with the error.

 

Can anyone point me on documentation about error handing in DAQmx?

If it is not possible - please answer on next question.

Meas Pulse Witdh-Buffered-Cont.vi from NI examples can be my example. If program get error in "DAQmx Read - Counter 1D DBL NSampl" what should be next step:

1. Clear error and continue to read

2. Clear error, stop task and start again

3. Clear error, clear task and create new task (in example, restart program)

4. Stop whole program and re-start program beginning from Reset DAQ cards.

5. Restart Windows.

 

Which way is correct?

Of course, 4 and 5 are not acceptable. Unfortunately, I had moments when only re-start program with Reset DAQ cards helped.

 

P.s. I am just curious. Some topics here where people asked about -200141 error have suggestion to use another card with bigger FIFO (on-board) counter buffer size. I specially looked on detail specification of PCI-6711 (http://www.ni.com/pdf/manuals/371011c.pdf) and didn't find this infirnation. So what is the size of PCI-6711 counter FIFO buffer?

0 Kudos
Message 1 of 4
(3,460 Views)

Hello Vasilich2,

 

Thanks for your post!

 

I see you have some questions about error handling. One of the best ways to clear unwanted errors is to use the Clear Errors.vi which you can find on the functions palette by going to Dialog and User Interface >> Clear Errors. However it looks like you might be getting some buffer errors so if you do see an error its always a good idea to do something like you have in step 3. This allows you to stop the task and clear the resources. If that does not work then you can call a reset device.vi. The reset will definitely clear the buffer on the card and in memory. I do not feel that you would have to go as far as shutting the entire program down and restarting the computer. 

 

So the 6711 uses the DAQ-STC chip and there is a knowledge base that talks about counters.

 

How Big Is The Onboard Memory For NI-TIO & DAQ STC Counters?

 

Let me know if any of this information helps you with your application and I wish you the best of luck!

 

Cheers!

 

Corby_B

http://www.ni.com/support 

0 Kudos
Message 2 of 4
(3,438 Views)

Thank you, Corby_B.

 

I have re-wrote program to use 3d way but haven't tried.

 

Your link has

============

For NI-TIO counters in high speed buffered operations, values are alternately latched from SW and HW registers to a software buffer to achieve maximum transfer rates. In effect, this creates a two sample FIFO for each counter.

============

 

2 sample FIFO per each counter is buffer???

I can say only OMG ... That is definetely trouble place always ...

0 Kudos
Message 3 of 4
(3,425 Views)

Hello Vasilich2,

 

Thanks for your post back,

 

I am glad to hear that the information provided allowed you to re-write your program in a way that will be more affective for your application. You are right about the on board memory of the counter only having a very small buffer. However even though your buffer is small on the actual card the DAQmx driver makes use of the memory on your PC to "buffer" your counter. This allows you to take chunks of data just as you would on a AI channel. Take a look at this link that talks about how the information is handled in finite and continuous modes.

 

How are Buffers Read in Finite vs. Continuous Buffer Mode for Counter Operations?

 

Let me know if this clears up your questions and or concerns. Have a great day!

 

Cheers!

 

Corby_B

http://www.ni.com/support 

0 Kudos
Message 4 of 4
(3,401 Views)