Oscilloscope input range setting API bug with fw 600.0

Moku model: Pro
Operating system: Python API on Windows and Linux
Software version: 3.3.1.1, firmware version: 600.0

Bug or support request description:
Since the update to 3.3.1.1 and firmware version 600, the API does not correctly set the input range for the Oscilloscope. When a 700mV DC value is applied to the input (as measured accurately on the Pro using the Windows desktop application), the API device.get_data() returns values of [0.20000000435175025, 0.20000000435175025, …] (i.e., saturating at the 400mVpp input range limit) regardless of how the API has set the frontend. The results are identical after (successfully) executing the command

device.set_frontend(1,coupling=“DC”,impedance=“1MOhm”,range=“40Vpp”)

as well as with range=“4Vpp”. In each case, the function returns e.g. {‘coupling’: ‘DC’, ‘impedance’: ‘1MOhm’, ‘range’: ‘40Vpp’} which seems to suggest the range has been modified, but when acquiring the actual scope data, it doesn’t seem to be the case.

Switching back to the Windows app once again correctly gives the 700mV DC value for 4Vpp and 40Vpp input ranges.

This bug is exclusively related to the last firmware update which we performed yesterday. The same codebase was working - with no other changes - until then.

This is further confirmed when connecting to the Pro after configuring the input range on the Windows application using the API with “persist_state=True”, which now accurately reports 700mV. Setting the input range to 4Vpp with set_frontend() once again bring the reported data values down to 0.2000000435…

I encountered another set_frontend() bug, this time in the Laser Lock Box while trying to recreate the issue in other instruments:

llb.set_frontend(1,coupling=“DC”,impedance=“1MOhm”,attenuation=“-20dB”)
TypeError: LaserLockBox.set_frontend() got an unexpected keyword argument ‘attenuation’

This is despite ‘attenuation’ being listed as a required input argument for set_frontend on the Moku API, instead returning an undocumented (though intuitively named) parameter “gain”

Hi todd,

Thanks for reporting these!

Firstly for the llb.set_frontend() issue, I have pushed a fix to the documentation to change the attenuation attribute to be gain, so your code should change to:
llb.set_frontend(1,coupling=“DC”,impedance=“1MOhm”,gain=“-20dB”)
This change will show up on the API documentation soon but the above line of code will set the llb frontend correctly.

Secondly, I am working with the dev team to understand the Oscilloscope range bug you’ve encountered. Until this is fixed you could set the range in the App and then continue your scripting for the rest of the settings or, if that workflow does not work for your team, get in touch with the support team for how to downgrade your firmware.

Hi Todd,

we have figured out this issue, together with a work around.

Immediately after instantiating the oscilloscope, make a call

set_defaults()

and this will workaround the issue. We will resolve the underlying issue in the next release,

Thank you for the timely report,

Paul.