NoneType object in oscilloscope.get_data

Hi,

I’m using the python API to get data from the oscilloscope function of a Moku Go. When I specify a number of measurments frame_length that is greater than 4096, entries toward the end of both ‘ch1’ and ‘ch2’ register as NoneType Object. Changing the timout parameters (both the oscilloscope timout and the .session.read_timeout) did not help. Using wait_complete and wait_reacquire also did not help. The number of list elements registering as NoneType object seems to change based on the timebase, but I have not found a particular timebase that aleviates the probleme completly. The problem is reproducible : for the same parameters, the same list elements register as NoneType objects.
I include here a minimal working exemple :

from moku.instruments import Oscilloscope

osc = Oscilloscope(‘MokuGoIPadress’, force_connect=True)

osc.set_timebase(0,0.5,8192,strict=True)
test = osc.get_data()

Hi Hugo,

This seems to be the same question as I posed before, see the thread here: Bug: oscilloscope on Moku:Go returns incomplete data arrays with trailing NoneTypes for frame_lenghts > 2048

Hello @HugoMarot and @dhwielens,

For larger frame lengths and spans, there are cases where you still see None even with wait_complete=True, but not for the timebase you requested. If you have requested t1, t2, get_data will give you data for the span t1, t1+x, and the NoneTypes will be present only for this additional x and not for t1 to t2. For example, the data will look like this:

'time':[t1    ... t2,    t2+n, t2+n*2 ... t2+x]
'data':[float ... float, None, None   ... None]