US English (US)
JP Japanese
CN Chinese
KR Korean

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Knowledge Base Home
  • Contact Us
English (US)
US English (US)
JP Japanese
CN Chinese
KR Korean
  • Home

How do I upload a custom waveform using APIs?

Written by Sarah Elgamal

Updated at June 29th, 2023

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Moku:Go
    Moku:Go General Moku:Go Arbitrary Waveform Generator Moku:Go Data Logger Moku:Go Digital Filter Box Moku:Go FIR Filter Builder Moku:Go Frequency Response Analyzer Moku:Go Logic Analyzer & Pattern Generator Moku:Go Oscilloscope & Voltmeter Moku:Go PID Controller Moku:Go Spectrum Analyzer Moku:Go Waveform Generator Moku:Go Power Supplies Moku:Go Lock-in Amplifier Moku:Go Time & Frequency Analyzer Moku:Go Laser Lock Box Moku:Go Phasemeter
  • Moku:Lab
    Moku:Lab General Moku:Lab Arbitrary Waveform Generator Moku:Lab Data Logger Moku:Lab Digital Filter Box Moku:Lab FIR Filter Builder Moku:Lab Frequency Response Analyzer Moku:Lab Laser Lock Box Moku:Lab Lock-in Amplifier Moku:Lab Oscilloscope Moku:Lab Phasemeter Moku:Lab PID Controller Moku:Lab Spectrum Analyzer Moku:Lab Time & Frequency Analyzer Moku:Lab Waveform Generator Moku:Lab Logic Analyzer/Pattern Generator
  • Moku:Pro
    Moku:Pro General Moku:Pro Arbitrary Waveform Generator Moku:Pro Data Logger Moku:Pro Frequency Response Analyzer Moku:Pro Oscilloscope Moku:Pro PID Controller Moku:Pro Spectrum Analyzer Moku:Pro Waveform Generator Moku:Pro Lock-in Amplifier Moku:Pro Laser Lock Box Moku:Pro Digital Filter Box Moku:Pro FIR Filter Builder Moku:Pro Phasemeter Moku:Pro Multi-instrument Mode Moku:Pro Logic Analyzer/Pattern Generator Moku:Pro Time & Frequency Analyzer
  • Python API
  • MATLAB API
  • Arbitrary Waveform Generator
  • Data Logger
  • Digital Filter Box
  • FIR Filter Builder
  • Frequency Response Analyzer
  • Laser Lock Box
  • Lock-in Amplifier
  • Oscilloscope
  • Phasemeter
  • PID Controller
  • Spectrum Analyzer
  • Time & Frequency Analyzer
  • Waveform Generator
  • Logic Analyzer & Pattern Generator
  • Multi Instrument Mode
  • Moku Cloud Compile
  • Moku general
  • LabVIEW
+ More

The Arbitrary Waveform Generator can load custom waveforms from comma- or newline-delimited text. The maximum number of points depends on the sample rate. The relationship between the number of points and the sampling rate for each device can be found in the user manuals or in Tables 1 through 3 found below for each device. 

Please note that the LUT data needs to be a 1D array of amplitude values. The AWG assumes that they are evenly spaced over the set waveform period. The values will be normalized to the range [-1.0, +1.0] and then scaled to the desired amplitude and offset.

 

Python:

You can use the lut_data parameter in the generate_waveform function to upload the lookup table amplitude values from an array that was previously defined. For additional documentation on the generate_waveform function, please refer to the Moku API reference documentation.   You can find a Python example here.

MATLAB:

The procedure for MATLAB is similar to that of Python where you will need to define a 1D array of amplitude value points and call it as a parameter in the generate_waveform function. You can find additional documentation on the generate_waveform function in the Moku API reference online.  You can find a MATLAB example here.

LabVIEW:

The Moku AWG generate_waveform.vi's input control LUT Data is the 1d data array used to define a custom waveform.  Figures 1 and 2 show how to modify the Arbitrary Waveform Generator Example.vi block diagram to read LUT Data from a file.  The Arbitrary Waveform Generator Example.vi can be found in LabVIEW by going to Help -> Find Examples, from the Browse tab change the view to Directory Structure, then go to Liquid Instruments -> Liquid Instruments Moku.

 

Figure 1: Example vi with LUT data coming from the signal generator

 

Figure 2: Modified example to load custom waveform (LUT data) from a file. 

 

 

Moku:Pro

Max Number of Points

Sampling Rate

16,384

1.25 GSa/s

32,768

625 MSa/s

65,536

312.5 MSa/s

Table 1: Moku:Pro's maximum number of points for each sampling rate 

 

Moku:Lab

Max Number of Points

Sampling Rate

8,192

1 GSa/s

16,384

500 MSa/s

32,768

250 MSa/s

65,536

125 MSa/s

Table 2: Moku:Lab's maximum number of points for each sampling rate 

 

Moku:Go

Max Number of Points

Sampling Rate

8,192

125 MSa/s

16,384

62.5 MSa/s

32,768

31.25 MSa/s

65,536

15.625 MSa/s

Table 3: Moku:Go's maximum number of points for each sampling rate 

awg arbitrary waveform generator apis matlab labview python custom uploading

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Troubleshooting USB connection on Windows App
  • Stimulated Raman Scattering Microscopy
  • Moku:Go Magnetic Power Adapter Specifications
  • How to hard reset Moku:Go when it cannot boot?

Sitemap

  • Moku:Lab
  • Instruments
  • Software
  • Company
  • Support
  • Store
  • Terms & Conditions
  • Privacy Policy

Offices

United States
+1 (619) 332-6230
12526 High Bluff Dr
Suite 150
San Diego, CA 92130

Australia
+61 2 6171 9730
243 Northbourne Avenue
Suite 2
Lyneham, ACT 2602

Australia
+61 03 7073 3594
700 Swanston Street
Suite 5E, Level 5
Carlton, VIC 3053

Follow us

Youtube LinkedIn

官方微信

Contact us
© 2025 Liquid Instruments. All rights reserved.

Knowledge Base Software powered by Helpjuice

Definition by Author

0
0
Expand