PID.enable_input(1, enable =False)

How does one disable the input to one of the PID channels?


InvalidParameterException Traceback (most recent call last)
Cell In[36], line 1
----> 1 PID.enable_input(1, enable =False)

File /opt/conda/envs/lab/lib/python3.13/site-packages/moku/instruments/_pidcontroller.py:243, in PIDController.enable_input(self, channel, enable, strict)
237 operation = “enable_input”
238 params = dict(
239 strict=strict,
240 channel=channel,
241 enable=enable,
242 )
→ 243 return self.session.post(
244 f"slot{self.slot}/{self.operation_group}", operation, params
245 )

File /opt/conda/envs/lab/lib/python3.13/site-packages/moku/session.py:23, in handle_response..func_wrapper(self, *args, **kwargs)
20 @wraps(func)
21 def func_wrapper(self, *args, **kwargs):
22 response = func(self, *args, **kwargs)
—> 23 return self.resolve(response)

File /opt/conda/envs/lab/lib/python3.13/site-packages/moku/session.py:204, in RequestSession.resolve(self, response)
202 return data.data
203 elif data.success is False:

→ 158 raise exceptions.InvalidParameterException(messages)
159 elif code == “INVALID_REQUEST”:
160 raise exceptions.InvalidRequestException(messages)

InvalidParameterException: [‘Invalid request. enable cannot be empty’]

Hello @jephwack ,

Thank you for reaching out to Liquid Instruments. There is a known issue with pid.enable_input(enable=False). We are currently working on a fix for this and hope to have it out shortly. In the meantime, will using enable_output() be a sufficient workaround? You can also turn the input signal off in the app and use persist_state=True in your script to keep the state. There is also an option to configure the system with the input signal off, save the configuration file, and upload the file via the API. The limitation of the last two methods is that you will not be able to dynamically control the input signal (i.e. the input signal will start in the ‘off’ state and you will only be able to turn it on but not off again). I hope this is helpful and will update this thread when a fix has been released.

-Dylan