I am using a 5242D MSO and I am trying to do this to test my application:
1) Generate a square wave with the ps5000aSetSigGenBuiltInV2 with 1V peak-to-peak ranging from 0-1V
Code: Select all
ssssssssssssssssssssssssssssssssswavetype = ctypes.c_int32(1)
sweepType = ctypes.c_int32(0)
triggertype = ctypes.c_int32(0)
triggerSource = ctypes.c_int32(0)
offset = int(1000000*0.5)
self._status["setSigGenBuiltInV2"] = ps.ps5000aSetSigGenBuiltInV2(self._chandle, offset, 1000000, wavetype, 1, 1, 0, 1, sweepType, 0, 0, 0, triggertype, triggerSource, 0)
assert_pico_ok(self._status["setSigGenBuiltInV2"])
3) I set a simple trigger with a threshold of 500 mV
Code: Select all
threshold = int(mV2adc(500,chARange, maxADC))
# direction = PS5000A_RISING = 2
# delay = 0 s
# auto Trigger = 1000 ms
self._status["trigger"] = ps.ps5000aSetSimpleTrigger(self._chandle, 1, source, threshold, 2, 0, 1000)
assert_pico_ok(self._status["trigger"])
The result that I am getting from function ps5000aGetValues is 0 and I do not understand why, because when I start the picoscope I should get data immediately and instead I am waiting for a lot of time and no data was saved in the memory of picoscope.
This is a simple application but I am not getting there.