Moku model: Moku:Pro
Operating system: Windows 11
Software version: Firmware 580, MATLAB/Python API
Bug or support request description:
I’m trying to use the second channel of the WG as the modulation source for the first channel in MIM, which I can easily set-up using the iPad and desktop apps. When trying to automate the measurement and do it via the API, code that sets up FM modulation of Channel 1 with Channel 2 being the modulation source produces an error “Output2 not a valid modulation source”. A MWE for matlab
%Minimal working example of Moku:Pro MultiInstrument mode waveform
%generator API bug: cannot set Output2 as modulation source, while in single
%instrument mode yes
%Single instrument mode
wg=MokuWaveformGenerator('192.168.200.15',1)
wg.generate_waveform(1,'Sine','amplitude',2.0, 'frequency',57.8e6)
wg.generate_waveform(2,'Pulse', 'amplitude',1.0, 'frequency',1.0, 'offset',0.5, 'edge_time',4e-9,'pulse_width',69e-6)
wg.set_modulation(1,'Frequency','Output2','depth',30e3)
%connect to Moku:Pro via Ethernet, check the IP through desktop app/configure
%device/ethernet
mim = MokuMultiInstrument('192.168.200.15',4,1)
wg = mim.set_instrument(1, @MokuWaveformGenerator)
wg.generate_waveform(1,'Sine','amplitude',2.0, 'frequency',57.8e6)
wg.generate_waveform(2,'Pulse', 'amplitude',1.0, 'frequency',1.0, 'offset',0.5, 'edge_time',4e-9,'pulse_width',69e-6)
wg.set_modulation(1,'Frequency','Output2','depth',30e3)
The issue is reproducible with both MATLAB and Python. By playing around i’ve also noticed that “Input” 1-4 are also not valid sources, but “InputA” and B are.