Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

AT-MIO-16E-10 : Data Acquision

Hi
I am using the above card for acquiring data simultaneously on 4 channels. I have written both labview as well as Visual basic codes for this. I see that the maximum sampling rate given for the card (100 kS/s) is shared between the channels - I get maximum of 25 kS/s. I am acquiring photodiode signals detecting laser pulses with repetition rates ranging from 10 Hz to 100 kHz. I want to acquire 500 scans (points) per each laser shot and this, along with the maximum allowed sampling rate restricts my signal frequency to 50 Hz. I am using software triggering (stop) with Channel 4. I can change the number of pulses to acquire (with 50 Hz or lower)
I have the following problems:

1) Even with 50 Hz or 25 Hz signal repitition rate, the program (Visual Basic) does not acquire all the pulses I select.
2)It often gives Error :-10846 suggesting that I should either increase the buffer size, reduce the rep.rate, reduce the acquisition rate or reduce the tasks that my PC is undertaking. I am using a P-II with 64MB RAM. I know it is old 🙂 I tried with changing buffer size but it did not work. I cannot reduce the repetition rate or acquision rate for my application.
3) the labview program does not give an error but it also does not acquire all the pulses I select.
4) The problem gets worse when I try to write the data to a file.

I am using the acquisition program (both VB and labview) to simulate an oscilloscope. Is this causing the trouble? I am attaching my codes here. The file-writing part in VB program is commented out.
Thanks for your help
Rajeev
0 Kudos
Message 1 of 4
(3,650 Views)
Rajeev,
Everything you have stated points to the fact that the bottleneck of your system is perhaps your PC. It appears that your machine is simply not fast enough to keep up with the acquisition. That explains the errors and also explains why it gets worse when you are writing to a file (more stuff bogging down the processor). If you sample at a much lower rate from fewer channels, does everything work properly? Sorry, this is probably not the answer you were looking for, but that is my take.
-Alan A.
0 Kudos
Message 2 of 4
(3,630 Views)
One possible way of getting around the File I/O problem in LabVIEW could be by having two loops running in parallel: one will do the data acquisition and write to a Queue structure, and the other loop will get information from the queue and write to the file. That way the dataflow in the acquisition loop will not be dependent on the file I/O functions. This is the recommended method in LabVIEW RT for doing data acquisition with file I/O, to enhance determinism, so I feel it can be a good programming tip in this case.

I hope that helps!

GValdes
0 Kudos
Message 3 of 4
(3,621 Views)
Thanks guys. I did manage to get rid of that problem by allocating a larger buffer size and periodically clearing the buffer. That works for now.
-Rajeev
0 Kudos
Message 4 of 4
(3,594 Views)