How can we use the blocking / callback interface with the 2405a from Python? Will you be updating the wrapper code on github? There is a 5000a-series Python example in the sample code, but it doesn't work for the 2405a due to the missing BlockReadyType.
Code: Select all
ready = False def block_callback(handle, statusCallback, param): global wasCalledBack, ready wasCalledBack = True if statusCallback != PICO_STATUS['PICO_CANCELLED']: ready = True # Convert the python function into a C function pointer. cFuncPtr = ps.BlockReadyType(block_callback) status["runBlock"] = ps.ps2000aRunBlock(chandle, preTriggerSamples, postTriggerSamples, timebase, oversample, None, 0, cFuncPtr, None) while ready == False: # support blocking call time.sleep(0.01)