When trying to acquire a single period of a waveform, e.g. sine wave, that’s 1 us long (1 MHz), 4 Vpp where trigger level is set to the half the Vp, the oscilloscope times out due to no acquisition. However, this does not happen all the time but 2 or 3 times out of 100 times which still obstructs our test flow.
The way it is implemented is as such:
osc = Oscilloscope(MOKU_IP_ADDRESS)
.
.
.
osc.set_trigger(level=v_p / 2, mode="Normal")
time.sleep(1)
play_sine_wave(duration=1e-6, amplitude=v_p)
acquisition = osc.get_data(timeout=10)
In case of a time-out there are two types of time-out errors thrown:
-
If the default
timeout
value,60
, forget_data()
is used then the error thrown is:MokuException: Unknown exception. Status code:504
which is to my understanding a Gateway
Timeout error of HTTP. -
If the
timeout
value is set to10
forget_data()
then the error thrown is:MokuException: ['Timeout before fetching the new frame']
At the moment catching one of those errors and repeating the acquisition fixes the behavior, however I would like to hear from you what might be done to not have this behavior and to consistently acquire a waveform that’s way within its specs.