Working with Multiple Acquisition Buffers in WaveForms

Overview

WaveForms supports the acquisition of multiple buffers in the same acquisition pass. This can be handy if you’re looking for rare events in an acquired signal, as it lets you take many “normal” acquisitions and scroll back through after the fact to look for oddities in one of them. It also lets you collect data on how your circuit under test performs over multiple test runs – does it respond the same way every time?

It should be noted that this document primarily describes the functionality of the Scope instrument in WaveForms. All the same concepts can be applied to the Logic Analyzer and others.


Inventory

To observe the UI, all you need is a computer with WaveForms installed. Check out the WaveForms Getting Started Guide for installation instructions.

All Digilent Test and Measurement devices support the acquisition of multiple software buffers. The “Device Buffering” feature, which enables storing buffers in hardware to reduce blind time, is available for select devices, including the ADP2230, ADP3450, ADP3250, and Eclypse Z7.


Table of Contents

1. Configuring Acquisitions with Multiple Buffers

1.1. Software Buffers

What is a buffer? In this context, a buffer refers to one triggered acquisition, and the block of samples it produces. Clicking the “Single” button causes your device to perform a single acquisition and capture a single buffer. By calling a buffer a “software buffer”, we mean that, after the device has captured that data, the data has been transferred up to the host computer and WaveForms for viewing and post-processing.


1.2. Time Base and Triggers

Normally, buffers are configured using a couple of settings. The Time group on the right side of the window can be used to specify several properties of an acquisition, including the number of Samples. By default, the number of Samples will be equal amount allocated to each channel for a particular configuration within the WaveForms Device Manager. For devices with deep buffer memory, the default value will be set to the amount of samples allocated to just BRAM – usually 32 k samples.

Triggers can be configured using the menu above the plot, and allow you to specify where in the acquisition the event you want to find should fall. Setting the Time Group’s Position and Base fields specify where in the buffer and acquisition that event falls.

Click to Enlarge
Figure 1: The default buffer size can be seen in the WaveForms Device Manager

1.3. Triggers and Blind Time

You can also normally perform multiple acquisitions in a row, rendering each to the screen. This is typically done by using Repeated, Shift, or Screen mode, and pressing the Run button. When performing multiple acquisitions, a concept called Blind Time, or hold-off time, comes into play. This concept defines the amount of time between one triggered acquisition and the next, and will be important later. For typical software-timed repeated acquisitions, blind time is fairly long, requiring the device to make an acquisition, transfer the data buffer up to WaveForms software, process it, and render it on screen. This typically takes 10s of milliseconds, and for repeated acquisitions where you are trying to spot something, can be easy to miss, since refresh rates on screens, and the limitations of the human eye, come into play.

An example of software timed triggered acquisitions is shown in Figure 2, measuring the time difference between each buffer, resulting in ~15 milliseconds of blind time between each acquisition.

text
(a) Buffer 34 was captured at 157.663.580 milliseconds
text
(b) Buffer 35 was captured at 172.483.690 milliseconds

Figure 2: There can be nearly a 20 millisecond blind time between acquisitions with just software timing.

Note: You may notice that sample rates for the acquisitions in Figure 2 don't match the time base settings. The plot panes were zoomed out after the acquisitions were captured so that the entire acquisition could be seen on screen. Here, you can see that these acquisitions were each performed over a roughly 320-microsecond period.

Blind time can be calculated by taking the difference between the timestamps of two subsequent acquisitions and subtracting off the time that the system was acquiring before and after the trigger. Since the trigger position is the same between the acquisitions, the latter term can be replaced by the total duration of one acquisition (number of samples divided by sample rate).

For example, the blind time between the acquisitions above can be calculated as follows:

172.483690 ms - 157.663580 ms - (32,768 Samples / 100 MS/s) = ~14.5 ms


1.4. Buffer Configuration

You can control how many buffers will be taken when you click the Run button. Within the Scope instrument, the gear dropdown containing the buffers setting is directly to the right of the Run button in the top left-hand corner of the GUI. Inside the gear, you will find options to specify the Run behavior:

  • An option to adjust the number of PC buffers from the default value of 10 all the way up to 10000
  • A dropdown option to change how long the instrument runs:
    • When Continuous is selected, and you hit the Run button, data will keep continuously being acquired. When a new buffer is stored, if the software is already holding as many buffers as you requested in the Buffers field, the oldest is discarded. This means that in continuous mode, the system will keep running until you hit stop, and, once you hit stop, the last N buffers will be available for you to look through.
    • Selecting Buffer Stop will cause the system to automatically stop acquiring new data when the requested number of buffers have been filled, as if you had hit the stop button as soon as the software received the last buffer.
    • Selecting Limit Stop allows you to set a limit well past the buffer count, so that you can get the benefit of automatically stopping at some point, while still being able to run for much longer than your buffer count might imply. This is useful if you want to collect a bunch of data, potentially stop the system when you see something weird, and also automatically stop a test after some time − you might not want to go back through a thousand or more captured buffers, but you might want to watch as they get rendered to the screen.
  • A Device Buffering check box is available for devices that support it − section 1.5 Device Buffering goes into more detail on this feature.
  • A button to Clear buffers which clears all of the captured acquisitions that are stored in the host computer
  • A button to Delete all tabs which will close any tabs containing individual acquisitions that users have chosen to manually create. See section 2.2 Plot Tabs for additional information.
  • A checkbox to Clear on start, which will clear the Plot screen every time the instrument is started, regardless of the buffer status, to offer users a 'clean slate' when acquiring new data.
Buffering Gear Dropdown
Figure 3: You can change a number of details about buffering through this dropdown.

1.5. Device Buffering

Device buffers are a relatively recent addition to WaveForms, supported by the ADP2230, ADP3250, ADP3450, and Eclypse Z7. This feature makes use of deep on-device memory to store multiple acquisitions locally, allowing the device to continue taking more acquisitions instead of sitting around waiting for data to be transferred out via USB. This improves blind time at the cost of the recording length for an individual acquisition. Rather than potentially needing 10s of milliseconds or more to rearm between triggers, these devices can rearm in several microseconds, helping you make sure that you capture those rare events that could otherwise be missed. Check the Device Buffering box to turn on this feature. When using it, make sure that the number of samples specified by your time base multiplied by the number of buffers you are acquiring fits within the maximum analog input buffer size specifications for your device – memory that otherwise stores a single buffer will now instead be divided up evenly between many.

To enable device buffering, check the corresponding box in the gear menu, as seen in Figure 3.

Device buffering is also sometimes referred to as memory segmentation, due to how memory space on the device is divided up between multiple buffers. In Digilent devices, analog input buffer memory in the device is divided evenly between each of the device buffers - a 32 MS input buffer can be split into 32 different 1 MS input buffers for repeated acquisitions.

Using the same physical hardware setup as was used in Figure 2, that is, an incoming 50 kHz signal being analyzed at 100 MHz with 32,768 samples per acquisition, it can be seen in Figure 4 that enabling Device Buffering reduces the time between acquisitions by a couple of orders of magnitude.

text
(a) Buffer 38 was captured at 172.339.470 milliseconds
text
(b) Buffer 39 was captured at 172.669.470 milliseconds

Figure 4: With Device Buffering, the blind time is only a few microseconds longer than the total acquisition length.

Blind time between the acquisitions performed in these screenshots can be calculated as follows:

172.669 ms - 172.339 ms - (32,768 Samples / 100 MS/s) = ~2.32 μs

This blind time, and thus the overall time between subsequent triggers, is much smaller than the period of the 50 kHz signal, meaning that it is exceptionally unlikely that any events will be lost.


2. Viewing Captured Data

2.1. Starting an Acquisition and Observing Progress

As normal, click the Run button to start acquiring data. While the device is acquiring, you will be able to observe the Buffer field incrementing, as the plot pane always shows the latest capture. You can also observe the timestamps and buffer counts changing in the plot pane. Click Stop to stop acquiring data. It should be noted that when using device buffering, data that has not yet been transferred up to the host will be lost – the entire acquisition system is stopped.

(a) A 2 second video showing the buffer value incrementing.

text
(b) Note how the most recent WaveForms viewable buffer is number 12, but the device had captured up 33 buffers before the acquisition was prematurely stopped.

Figure 5: You can watch the buffers fill up on WaveForms. Just make sure to let all of the data transfer if you want to view it.


2.2. Plot Tabs

Tabs are an alternate method of viewing each of the acquisitions. Rather than scrolling through the Buffer index to view and mentally keep track of individual acquisitions, users can add a Tab via the green “plus” icon to separate out and easily keep reference of a particular acquisition.

Data from an old acquisition.
(a) Tab 1 contains data from an old acquisition.
Data from a new acquisition.
(b) Tab 2 contains data from a new acquisition.

Figure 6: Note how Tab 1 still has old data from an acquisition taken over 5 minutes before the different data acquisition shown in Tab 2.


2.3. Timestamps and Acquisition Information

Each acquisition has its own timestamp of when the device finished acquiring the data. This is viewable above the Scope Plot; the accuracy of the timestamp depends on the hardware. For hardware such as the Analog Discovery 3, Analog Discovery Pro 3000 series, Eclypse Z7, or newer devices, there is high resolution device timer to provide up to 8 ns resolution while also synchronizing with the host computer’s time keeping. Older devices such as the Analog Discovery 2 will only use the software timing which can vary with USB activity.


2.4. Persistence

Several other views in the Scope instrument can take advantage of buffering settings. The Persistence view in particular renders all buffers that have made it up to WaveForms software over the top of one another, to show a heat map of how a signal most commonly moves relative to the trigger. Persistence is particularly handy in some specific kinds of tests. We wrote about it in this blog post on Eye Diagrams, https://digilent.com/blog/creating-an-eye-diagram-in-waveforms/.

The Persistence view can let you see signal properties that occur less often.
Figure 7: The Persistence view can let you see signal properties that occur less often.

2.5. Measurements

The Measurements tab can be used with multiple buffers. This tab can be used to do various kinds of postprocessing on acquired data, such as finding the minimum or maximum voltage measured. After opening the measurements tab, click the gear icon and check the “Multiple captures” button. This will make it so that data for measurements can be stored between acquisitions. Use the Show dropdown to display the mean, minimum, maximum, and other values of a measurement that you’ve performed. This could let you, for example, perform a hundred acquisitions of a pulse and determine what the highest height the pulse reached in any of those acquisitions was, without going back through each individual capture to manually check.

The Measurements View can let you see some trends over time.
Figure 8: The measured peaks of a ramping sine wave can be seen across multiple buffers.

Conclusion

This document described many of the features related to multiple buffer acquisition in WaveForms. If you want more information on Device Buffering in particular, and some of the applications that these features are well suited to support, check out this blog post: Rapid Trigger Buffering with Deep Memory Support