I was researching the best way to do continuous data acquisition and found the following article:
The standard use of continuous acquisition is to fetch a record that is larger than the available memory on the digitizer. Because the data is fetched as it is acquired, the digitizer memory can be overwritten. At slow sampling rates, you can fetch data forever by setting up an acquisition that is never triggered and is repeatedly fetching. At faster sampling rates, the host computer may not be able to fetch as fast as the digitizer samples data. If the data that is being fetched is overwritten, NI-SCOPE returns an error message from the Fetch function. Look at the Fetch in Chunks example to see how a waveform can be reconstructed with the data from multiple fetch calls. Look at the Fetch Forever example to benchmark how much data you can acquire at a given sampling rate before the data is overwritten.
To fetch a record that is larger than memory, set the Fetch Relative To attribute to Read Pointer. This positions the beginning of the fetch operation at the start of the record when you initiate a new acquisition. After every fetch, the read pointer is incremented to be the sample after the last sample retrieved. Therefore, you can repeatedly fetch relative to the read pointer, with a retrieval offset of zero, to acquire a single, infinite record.
If you specify a positive timeout with a Fetch function, it waits for the requested number of samples. Alternatively, specifying a timeout of zero acquires the number of samples currently available (up to a maximum of the numSamples parameter). The waveform info structure returns the actual number of samples fetched. Using a timeout of zero achieves slightly better performance because the status of the digitizer is queried less often.
A separate read pointer is stored for each channel, so you can alternate fetching different channels. The read pointer is also reset to zero when you fetch from a different record.
I had planned to simply note that providing a hot-link to the examples mentioned would be helpful. Instead, the Add Comments link sends me to a page that asks for new product ideas and then sends me to this forum after noting that NI does not accept new product ideas for LabVIEW. I think you should either remove the Add Comments link or else direct it to something that actually does what one would expect.
In general I find the help function in LabVIEW to be well organized and usually helpful. It is a shocking contrast that the on-line search function most often returns chaotic (in the mathematical sense) results and is often of no help at all. A confusing structure as noted above just makes the experience worse.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has not received any kudos within a year after posting will be automatically declined.