Moku:Go 3 slot MIM pid set by gain and section doesn't work for section 2

Moku model: Moku:Go M2 Firmware 635.0
Operating system: Windows 11
Software version: MokuOS 4.1.2

Bug or support request description:

In multi-instrument context, if platform id=3, when using the python API set_by_gain_and_section to set PID behavior using the advanced functionality of the PID controller like the following:

pid.set_by_gain_and_section(
channel=1,
section=2,
overall_gain=0.0, # Placeholder value
prop_gain=0.0, # Placeholder value
)

I get

moku.exceptions.InvalidParameterException: [‘Invalid section. Should be in between 1 and 1’]

Which is incorrect because there are two sections. This is a blocking problem for my application as set_by_gain doesn’t allow for me to utilize both sections to maintain a full output range while having a negative proportional gain.

An update: I attempted to enable section B prior to calling set_by_gain_and_section by loading a moku configuration file where I had manually enabled section B via advanced mode on the GUI.

However, I still encounter the same error.

Hello @JackAttack720 ,

Thank you for reaching out. I was able to replicate the error you are seeing using pid.set_by_gain_and_section(); I will report this to our team and update the thread once it has been fixed. As a workaround I was able to upload the .mokuconf files. Here is a snippet of the code I used:

m=MultiInstrument('192.168.X.XXX', platform_id=3, force_connect=True)

m.load_configuration('/Users/dylanperez/Downloads/PID_API_test/MokuMultiInstrument_20260223_130025.mokuconf')

pid=m.set_instrument(1, PIDController)

pid.load_settings('/Users/dylanperez/Downloads/PID_API_test/MokuPIDControllerSlot1_20260223_130720.mokuconf')

m.relinquish_ownership()

I hope this is an acceptable workaround for the time being and if you have any other questions please let me know.

-Dylan

That’s approximately useful, but I do still want to be able to update values programmatically. What kind of encoding is used in the 3_1_PID Controller file within the mokuconf? I think I can just make edits to an existing .mokuconf file and then load the settings to achieve what the API would normally do.

{
            "name": ["Controller 1", "Integrator gain"],
            "uid": "a41194a8-3be1-4c3d-ba79-85013a38bef1_1",
            "value": "AAAAAAAAAE5A",
            "value_string": "+60.0 dB",
},

I’ve just been trying to work out the conversion between the value and the value string and then I think we’d be good to go.

Thanks.

Hi @JackAttack720 ,

We have just released MokuOS 4.2 which includes a fix for this issue. Please download the new app here, upgrade your API package pip install --upgrade moku, and install the bitstreams mokucli instrument download 4.2.1. I hope this helps!

-Dylan

Thanks Dylan! Glad to hear this fix is in the latest update. Cheers!