I’d like to fill a Windows buffer at a high board-clocked rate with 20 seconds of samples from multiple analog input channels. At the same time, I need to be monitoring one (or more) of the analog input channels to make real-time process adjustments. Is this possible? Can I use AInScan() with BurstIo in background mode while also making readings periodically using Ain() at the same channel?
If that wouldn’t work, then how about this: If I route the same signal to 2 analog input channels, could I then fill the buffer with one of the channels using AInScan() while also periodically reading the other using Ain()?
Or, would using BlockIo instead of BurstIo be the best way to solve my problem? Can I get the system to continuously provide contiguous blocks of data using BlockIo in background mode, allowing me to continuously analyze the data of each of the latest blocks acquired?
- Job Title: Test Engineer
- Industry: Aerospace
- Application: Test Equipment
15 months ago
No, it is not possible to perform an AInScan() and periodically call AIn(). You can do them both, but not at the same time. I recommend doing the following. While performing you AInScan(), whenever you need a fresh sample, call GetStatus() to find out where you are in the buffer and copy the latest value(s) for immediate use. If you are running in a finite scan and have created a buffer large enough to hold all your requested data. Copying a piece of the acquired buffer will not disturb the entire (or rest of) buffer. If you are running a continuous scan and want to either save or use all the data as you are collecting it. When you transfer a portion of the buffer to local memory, use the value(s) at the end of the copied array (the highest array numbered elements) as these are the newest values and then also save or use the data as you have planned.
15 months ago
War diese Antwort hilfreich?
Ja (0) /