I want to generate a wave with the help of an arbitrary generator.

$$v(t) = \cos 60t + \cos 1000t$$

My school lab has an AFG-2125-E4 arbitrary generator.

I have tried to use arbitrary wave to generate the wave, but this method will require a lot of points to generate a good waveform which resembles the real one.

I have to manually enter the data of this data by hand, which takes huge amounts of time.

Any suggestions?


2 Answers 2

  • Read the manual, specifically the section on "Remote Interface" - it lists the arbitrary wave commands starting on page 130.
  • Write a program in Python (or other language of your choice) to generate the data points.
  • Extend the program so that it can write the data commands to the serial port of the generator.

You'll need a PC or a laptop, and a programming language that can easily access the serial ports. Python can do it, but so can other languages.


This is the sum of two sinusoidal signals, which can be generated independently by the generator.

If the generator can save a datapoint file of a generated wave on an external USB stick, you could do the following, assuming the file format is some kind of textual format:

  1. Generate the first signal, save the file with its samples.
  2. Generate the second signal, save the file with its samples.
  3. Write a program in any language you know that adds the samples together and writes a 3rd file with the sum of those two signals (be careful to respect the data format of the file).
  4. Load the file you created from the USB stick as a new waveform.

Steps 1 and 2 can be done directly by your program, as JRE suggested in his answer. However it is essential that you understand the format of the waveform signal, so probably you should save a test file in advance to "reverse engineer" the format (unless the manual already explains the format).

BTW, I used this trick some time ago with a BK-precision 4055B arbitrary waveform generator, and it worked perfectly. The waveform files were a simple two-column text file (CSV format) with the first column being the time instants and the second the corresponding value of the signal.

I first saved a datapoint file of a simple signal in CSV format just to understand it. Then I wrote a Lua program that generated the samples (16384 samples) of a complex waveform and wrote them to a CSV file with that format. Finally it was just a matter of loading that file from the USB stick using the normal AWG UI.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.