2.1.8. Arbitrary Waveform Manager

The Arbitrary Waveform Manager is an upgrade to the Signal Generator Application, which comes as a part of the Oscilloscope and Signal Generator and the Spectrum Analyzer applications, bringing to life arbitrary waveform generation. This excellent utility, previously exclusive to SCPI and API commands is now available in the form of Arbitray Waveform Manager application.

Arbitrary Waveform Manager is available on all Red Pitaya boards with the exception of STEMlab 125-14 4-Input version (does not have fast analog outputs).

2.1.8.1. Features

  • Upload one period of a custom waveform to Red Pitaya

  • Generate custom waveforms from Oscilloscope and Spectrum Analyzer applications

../../../_images/ARB_manager_controls.png
  1. Upload: Button to upload a CSV file with custom waveform.

  2. Signal name and colour: Change custom signal name and waveform colour.

  3. Delete waveform: Delete custom waveform.

2.1.8.2. Uploading custom waveforms

To upload a custom signal to Arbitrary waveform generator follow the setps below.

  1. Open Arbitrary Waveform Manager

    ../../../_images/ARB_manager.png
  2. Click on the Upload button and upload a CSV file containing one period of a custom signal with 16384 samples/points.

  3. Wait for the signal to appear on the screen.

  4. Configure waveform name and colour. To change the name click into the name field, to change the colour click into the colour field. The color can be selected from the screen with the eyedropper tool or configured through the colour manager utility that pops up.

    ../../../_images/ARB_manager_recolour.png
  5. Exit ARB Manager and open Oscilloscope or Spectrum Analyzer. Custom waveforms should appear in the Waveform Type drop-down menu. They can easily be distinguished from the standard waveforms through the custom font colours which match the waveform colours set in the ARB Manager.

    ../../../_images/ARB_Osc_waveforms.png

2.1.8.2.1. Example code for creating a custom waveform

Here is an example of Python code for creating a custom waveform.

#!/usr/bin/env python3

import numpy as np
import pandas as pd
from matplotlib import pyplot as plt

N = 16384                               # Number of samples
t = np.linspace(0, 1, N)*2*np.pi

x = np.sin(t) + 1/3*np.sin(3*t)         # Custom wavefrom definition
y = 1/2*np.sin(t) + 1/4*np.sin(4*t)

plt.plot(t, x, t, y)                    # Double-check with plot
plt.title('Custom waveform')
plt.show()

# Port waveforms to CSV fromat
pd.DataFrame(x).to_csv('arb_waveform1.csv', index=False, header=False, float_format=np.float64)
pd.DataFrame(y).to_csv('arb_waveform2.csv', index=False, header=False, float_format=np.float64)

2.1.8.3. Source code

The Arbitrary Waveform Manager source code is available on our GitHub.