# Specify output in Python API for Moku Pro

**URL:** https://forum.liquidinstruments.com/t/specify-output-in-python-api-for-moku-pro/1055
**Category:** Software & APIs
**Created:** [October 9, 2024, 1:17am UTC](https://forum.liquidinstruments.com/t/specify-output-in-python-api-for-moku-pro/1055 "2024-10-09T01:17:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tangshi2010](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@tangshi2010](https://forum.liquidinstruments.com/u/tangshi2010)
#### Post date: [October 9, 2024, 1:17am UTC](https://forum.liquidinstruments.com/t/specify-output-in-python-api-for-moku-pro/1055/1 "2024-10-09T01:17:40Z")

</div>

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”)

```auto

```

---

<div class="post-metadata">

### Author: ![indira](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.liquidinstruments.com/indira/32/317_2.png) [@indira](https://forum.liquidinstruments.com/u/indira)
#### Post date: [October 15, 2024, 4:27am UTC](https://forum.liquidinstruments.com/t/specify-output-in-python-api-for-moku-pro/1055/2 "2024-10-15T04:27:55Z")

</div>

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.
