Single instrument works as expected
from moku.instruments import LaserLockBox
LLB = LaserLockBox('moku.pro2.lab', force_connect=True, platform_id=4)
LLB.set_scan_oscillator(shape = 'NegativeRamp')
{'Output channel': 64,
'Scan shape': 2,
'amplitude': 0.5,
'enabled': True,
'frequency': 10.0,
'output': 'AnalogOutput1',
'shape': 'NegativeRamp'}
same request fails in multi instrument mode
from moku.instruments import LaserLockBox, MultiInstrument
MIM = MultiInstrument('moku.pro2.lab', force_connect=True, platform_id=4)
LLB = MIM.set_instrument(1, LaserLockBox)
LLB.set_scan_oscillator(shape = 'NegativeRamp')
---------------------------------------------------------------------------
InvalidParameterException Traceback (most recent call last)
Cell In[37], line 4
2 MIM = MultiInstrument('moku.pro2.lab', force_connect=True, platform_id=4)
3 LLB = MIM.set_instrument(1, LaserLockBox)
----> 4 LLB.set_scan_oscillator(shape = 'NegativeRamp')
File /opt/conda/envs/lab/lib/python3.13/site-packages/moku/instruments/_laserlockbox.py:242, in LaserLockBox.set_scan_oscillator(self, enable, shape, frequency, amplitude, output, strict)
233 operation = "set_scan_oscillator"
234 params = dict(
235 strict=strict,
236 enable=enable,
(...) 240 output=output,
241 )
--> 242 return self.session.post(
243 f"slot{self.slot}/{self.operation_group}", operation, params
244 )
File /opt/conda/envs/lab/lib/python3.13/site-packages/moku/session.py:23, in handle_response.<locals>.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:
--> 204 self._handle_error(data.code, data.messages)
205 else:
206 # Log the full response details for debugging
207 logger.debug(f"HTTP error response: {response.__dict__}")
File /opt/conda/envs/lab/lib/python3.13/site-packages/moku/session.py:158, in RequestSession._handle_error(code, messages)
156 raise exceptions.NoInstrumentBitstream(messages)
157 elif code == "INVALID_PARAM":
--> 158 raise exceptions.InvalidParameterException(messages)
159 elif code == "INVALID_REQUEST":
160 raise exceptions.InvalidRequestException(messages)
InvalidParameterException: ['AnalogOutput1 is not a valid value for Output channel']