LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample Code ai_acq

Hello:

Background: We are using NI DAQPad 6020E in our project and have lots of problem with it. We wish to read 12 input channels at the sampling rate of 100 Hz. First, we tried AI_read and timer CALLBACK set at 10msec to read all channels and it was very slow. Then we switched to scan_start and using the onboard buffer. We adjusted the timer based on the new number of points and used some sort of double-buffering. Obviously it was faster but unfrotunately we can't really use this method because we want to process the data as they come and this way we have to wait until some certain number of samples are acquired. We played with this number. When it is very low, the system is very slow again and when it is high, it is not favourable because it introduc
es delays in our processing.

Question: We contancted NI help line and they recommended use to use this project called in ai_acq in the sample folder but we cannot run it as we get this run-time error that the board is not an NI product. In this particular project, several functions from NI easy I/O library have been used (nidaqAIScanOp, etc) . We are wondering what the difference is between these functions and those ones in Data acqusition library. We are also wondering if this library works with our device and if yes, why we get this run-time error.

Regards,
0 Kudos
Message 1 of 2
(2,597 Views)
Hello,

If you keep polling every sample, then it will be slow indeed.

Do you want to process the data on the basis of sample by sample or after acquiring a set of samples.

In order to make sure you are writing the code correctly, I would suggest you to take a look at :

Link 1

C:\Program Files\National Instruments\MeasurementStudio\CVI\samples\daq\Ai as well.


Regarding the error, what is the exact error message you are getting?

Sincerely,
Sastry V
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,597 Views)