WaveForms SDK Benchmarks for Analog Discovery 2

Under Construction

The Analog Discovery 2 is is a multi-function instrument that allows users to measure, visualize, generate, record, and control mixed signal circuits of all kinds. Most of the performance specs are published such as analog signal scope’s maximum sampling rate, digital logic analyzer's maximum sample rate, or the arbitrary waveform generator’s maximum update rate. Those parameters can be found here: Analog Discovery 2 Specifications.

However other functions do not have performance specs. This is predominantly because they are PC or operating system dependent.

Provided here are some benchmarks for a subset of these software-paced Analog Discovery 2 features such as voltage readings using the Voltmeter, reading the static digital IO, writing to the static digital IO, and changing the values of the +5V and -5V power supplies separately and as together.

Materials Used to Perform the Benchmarks

The tests were performed on a Dell Precision Tower 5820 PC featuring Intel(R) Core(TM) i9-10920X CPU @ 3.50GHz, with 64 GB Ram. The PC was running the Microsoft© Windows 11 Enterprise operating system version 21H2, 64 bits.

Because of a potential disparity in data, the tests were performed using the four most popular programming languages/environments. Not listed in any order

  • Microsoft© Visual Studio C (version 2022)
  • Python 3.9, PyCharm© 2022.2.3
  • Microsoft© Visual C Sharp.NET 2022, framework 4.8
  • Microsoft© Visual Basic.NET 2022, Framework 4.8

Source code to benchmark test applications:

The device tested:

  • Analog Discovery 2
  • Waveforms SDK rev 1.8.7

Because these functions are software paced, each test was performed 3 times to help negate any Windows-based timing anomalies.

Input functions are tested in a tight loop for 10 seconds. Prior to the test, the data is viewed to ensure the data is collected correctly. However, during the test, nothing is done with the data as that would impact the maximum throughput rate of data collection.

All benchmark results are in readings/updates per second unless noted.


Voltmeter Voltage Measurement

Function calls required per measurement:
  • dwf.FDwfAnalogInStatus(hdwf, False, None)
  • dwf.FDwfAnalogInStatusSample(hdwf, c_int(0), byref(meas))
Results:
IDE / Language Benchmark #1 Results Benchmark #2 Results Benchmark #3 Results
Python 5,077 5,043 5,044
C 52,180 51,473 51,475
VB.NET 5,120 5,136 5,145
C#.NET 4,995 4,976 5,008

Benchmark voltmeter test shown in Python


Digital Input

Function used:
  • dwf.FDwfDigitalIOInputStatus(hdwf, dwRead)
Results:
IDE / Language Benchmark #1 Results Benchmark #2 Results Benchmark #3 Results
Python 5,200 5,170 5,243
C 52,983 52,501 49,639
VB.NET 5,326 5,094 5,186
C#.NET 5,252 5,118 5,195

Digital Input benchmark test result shown in C


Digital Output

Ran in tight loop. This is difficult to measure, as Windows OS interrupts the test app because of higher OS priorities. For all tests, the oscilloscope was used to measure a frequency, which was then converted into an Updates/Second figure by the formula,

Updates / Second = 2 x the oscilloscope's displayed frequency

Functions used:
  • dwf.FDwfDigitalIOOutputSet(hdwf, 0)
  • dwf.FDwfDigitalIOOutputSet(hdwf, 1)
Results:
IDE / Language Benchmark #1 Results Benchmark #2 Results Benchmark #3 Results
Python 6,400 11,200 8,600
C 10,980 6,520 8,500
VB.NET 7,800 14,300 10,540
C#.NET 7,200 10,600 9,610

For all tests, an oscilloscope was used to measure a frequency, which was then converted into the Updates/sec calculation by the formula,

Updates / Second = 2 x the oscilloscope's displayed frequency

Benchmark test: Digital Output test shown in C#.NET

Digital Output toggle benchmark test result viewed on oscilloscope


Individual Power Supply Test

Functions used:
Power Supply Functions used
+5 Volt
  dwf.FDwfAnalogIOChannelNodeSet(hdwf, 0, 1, 0.0)
    dwf.FDwfAnalogIOChannelNodeSet(hdwf, 0, 1, 1.0)  
-5 Volt
  dwf.FDwfAnalogIOChannelNodeSet(hdwf, 1, 1, 0.0)
    dwf.FDwfAnalogIOChannelNodeSet(hdwf, 1, 1, 1.0)  
Results:
IDE / Language Benchmark #1 Results Benchmark #2 Results Benchmark #3 Results
Python 2 2 2
C 2 2 2
VB.NET 2 2 2
C#.NET 2 2 2

For all tests, Library calls update faster than the AD2's power supplies can respond. Used a timed loop set to 500 mS to give the power supply adequate time to settle to the new setting. Toggled output values, 0 V, 1 V, 0 V… for +5 V supply (and 0 V, -1 V, 0 V… for the -5 V supply) AD2's power supplies were able to keep up with 500 mS. Updates per second are based on the timer set to 500 mS or 2 updates per second. Note: When setting voltage to 1 V the power supply responds immediately, but when setting voltage to 0 V, there is a discharge time. This is caused by the power supply's output filtering. At less than 500 mS off time, output is not guaranteed to fully discharge back to 0V. This is also true for the -5V supply set to -1 V then 0 V.

Updates / Second = 2 x the oscilloscope's displayed frequency.

Benchmark test: +5 V Output Supply shown in VB.NET

+5 V toggle benchmark test result viewed on oscilloscope


Dual Power Supply Test

In this test, both power supplies are set in the same software loop that was used in the individual supply test. Library calls update faster than the AD2 can respond. Used a timed loop set to 500 mS. Toggled output values, 0 V, 1 V, 0 V… for +5 V supply (and 0 V, -1 V, 0 V… for the -5 V supply) AD2's power supplies were able to keep up with 500 mS. Updates per second are based on the timer set to 500 mS or 2 updates per second. Note: When setting voltage to 1 V the power supply responds immediately, but when setting voltage to 0 V, there is a discharge time. This is caused by the power supply's output filtering.

Functions used:
  • dwf.FDwfAnalogIOChannelNodeSet(hdwf, 0, 1, 0.0)
  • dwf.FDwfAnalogIOChannelNodeSet(hdwf, 1, 1, 0.0)
  • dwf.FDwfAnalogIOChannelNodeSet(hdwf, 0, 1, 1.0)
  • dwf.FDwfAnalogIOChannelNodeSet(hdwf, 1, 1, 1.0)
Results:
IDE / Language Benchmark #1 Results Benchmark #2 Results Benchmark #3 Results
Python 2 2 2
C 2 2 2
VB.NET 2 2 2
C#.NET 2 2 2

For all tests, the oscilloscope was used to measure a frequency, which was then converted into the Updates/second figure by the formula below.

Updates / second = 2 x the oscilloscope's displayed frequency.

Benchmark test: Dual Output Supplies shown in python

+/-5 V supplies toggle benchmark test result viewed on oscilloscope