MATLAB: Arbitrary Waveform Generator
-
Moku:Go
Moku:Go Arbitrary Waveform Generator Moku:Go Data Logger 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 Digital Filter Box Moku:Go FIR Filter Builder Moku:Go Lock-in Amplifier Moku:Go General Moku:Go Logic Analyzer/Pattern Generator 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 Waveform Generator Moku:Lab Time & Frequency Analyzer Moku:Lab Logic Analyzer/Pattern Generator
-
Moku:Pro
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 Digital Filter Box Moku:Pro FIR Filter Builder Moku:Pro Phasemeter Moku:Pro Multi-instrument Mode Moku:Pro General 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
Example MATLAB script to implement the Arbitrary Waveform Generator
%% Arbitrary Waveform Generator Example
%
% This example demonstrates how you can configure the Arbitrary Waveform
% Generator instrument to generate two signals.
%
% (c) 2021 Liquid Instruments Pty. Ltd.
%
%
%% Prepare the waveforms
% Prepare the square waveform to be generated
t = linspace(0,1,100);
square_wave = sign(sin(2*pi*t));
% Prepare a more interesting waveform to be generated (note that the points
% must be normalized to range [-1,1])
not_square_wave = zeros(1,length(t));
for h=1:2:15
not_square_wave = not_square_wave + (4/pi*h)*cos(2*pi*h*t);
end
not_square_wave = not_square_wave / max(not_square_wave);
%% Connect to your Moku
% Connect to your Moku by its IP address.
i = MokuArbitraryWaveformGenerator('192.168.###.###');
try
% Configure the output waveform in each channel
% Channel 1: sampling rate of 125 MSa/s, square wave, 1MHz, 2Vpp.
i.generate_waveform(1, "625Ms", square_wave, 1e6, 2);
% Channel 2: automatic sampling rate, use the "not_square_wave" LUT, 10
% kHz, 1Vpp.
i.generate_waveform(2, "Auto", not_square_wave, 10e3, 1,...
'interpolation', true);
%% Set channel 1 to pulse mode
% 2 dead cycles at 0Vpp
i.pulse_modulate(1,'dead_cycles',2,'dead_voltage',0);
%% Set Channel 2 to burst mode
% Burst mode triggering from Input 1 at 0.1 V
% 3 cycles of the waveform will be generated every time it is triggered
i.burst_modulate(2, "Input1", "NCycle",'burst_cycles',3,'trigger_level',0.1);
catch ME
% End the current connection session with your Moku
i.relinquish_ownership();
rethrow(ME);
end
i.relinquish_ownership();