Specify output in Python API for Moku Pro

Hi,

Anyone knows how to specify the output in Python API?
I need to change the output from “50 Ohm” to “High Z” to enable 10Vpp +5V offset.

i.generate_waveform(
channel=1,
type=‘Sine’,
amplitude=10.0,
frequency=16e6,
offset=5.0,
output=‘High-Z’
)

But it gets back with “Exception occurred: WaveformGenerator.generate_waveform() got an unexpected keyword argument ‘output’”

If remove " output=‘High-Z’" then I have got this “Exception occurred: [‘Unable to set offset to desired value. Coerced value: 0.000000’, ‘Maximum output voltage +/-5 V’]”

After check with Moku app in WIN10, the output is set to “50 ohm”

I solved this by check the api ```
i.set_output_termination(1, “HiZ”)

Hi @tangshi2010,

You are correct that i.set_output_termination(1, “HiZ”) will set the output to HiZ.

You may have already figured this out, the other error you were seeing where the Maximum output voltage +/-5 V is because when the output termination is 50 Ω, which is the default option, the maximum output voltage is +/- 5 V, meaning that your 10 Vpp signal exceeds these limits with a 5 V offset. These limits are increased to +/- 10 V when the output is in HiZ mode, which is why you’d want this in the first place.

I hope this helps and I am glad you could find the correct code notation yourself.