Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NIDAQmx 8.3, LabWindows CVI 8.1, Buffered Event Counting: Migration from E/M series to NI-USB (6210)

Hello,
I create a project developed in LabWindows CVI that does buffered event counting.
The project ran on E/M series for a year. Now I have to migrate to NIDAQ-USB and precisely NI-USB-6210 (that is a M-series). The problem concerns reading acquired samples. The buffered event counting that I need is performed in this way:
1) Start a buffered event counting task
2) After n seconds, read the number of samples and read the samples
3) Stop the task
This procedure works fine on E/M series on PCI bus, but it does not work with NI-USB. With NI-USB, the number of samples is always 0. I link a project that demonstrates that (the "after n seconds" clause is simulated by pressing "stop" key).
After many tries, I saw that the problem is in reading number of samples and so I modified the sequence of operation in this way:
1) Start a buffered event counting task
2) After n seconds, try many times to read the number of samples
3) Read the samples
4) Stop the task
After some houndreds of attempts, the number of samples moves from 0 to the correct number of samples...It seems a bad working....And I don't know after how many attempts I can surely assert that no samples effectively "crossed" card input....
Is there an error in my procedure? Have I made some incorrect operations? Or maybe is there a inconsistency in NIDAQmx driver?
 
0 Kudos
Message 1 of 3
(3,572 Views)

Hi Luca Tesi,

Here's a simple LabVIEW program that polls the "Available Samples per Channel" property once every 100ms.  It seems the propety is working perfectly with my USB M-Series device.  I posted the code if you would like to look at it. 

Attachment ConBuff_ExtClk.vi (44 kb)

bye

0 Kudos
Message 2 of 3
(3,517 Views)
Hi Claracarla,
   thank you very much for your answer. I'm sorry for answering so late, I had problems in Internet connections.
   Following your hint, I made a modify in my project: the program now reads the number of available samples during the acquisition and it reads the samples at the end of acquisition. It's a workaround of the problem (I think that if there is a request of information to NIDaq, NIDaq should answer correctly) but it works fine and I think to definitively use it.
 
   Thank you. Bye.
 
Luca
0 Kudos
Message 3 of 3
(3,476 Views)