12-08-2010 04:29 AM
Dear all,
I want to ask your advice for my problem. I have 2 AIs, 2 AOs. The AOs are synchronized with the AIs (the sampling rate varies from 25 kHz to 100 kHz).
what I want to do is that: output bipolar rectangular pulses (from 60 us to 5s) and then stop (from 1s to 100s), and output the pulses again (with different amplitude). During this time, the AIs continuously acquire the signal and display. The whole process should be less than 1 second.
I tried the following flow:
1- Configure AIs, AOs: continuous sampling mode, sampling clock to synchronize, buffer
2. Write initial data to AO (including pulsing + stopping time)
3. Start AOs, AIs
3. Loop (while the task is not done)
- read data
- write data
- display data on the figure
4. Stop and clear the tasks
However, I get lagging time with the writing --> some of data in the acquisition are lost.
Could you suggest me any method to speed up the whole process? Should I use finite sampling mode? If yes, then I guess I should use a counter to retrigger the generate of the pulses again? In that case, where should I update the waveform?
Thanks a lot,
Alexis
12-29-2010 06:16 AM
Hello Alexis,
What do you exactly mean with lagging in the writing?
Is it possible to provide the used code?