Here is my code:
Code: Select all
t = np.linspace(0, 1, 1000, endpoint=True)
awgBuffer = signal.square(2 * np.pi * 1 * t, duty= 0.9)
awgbufferPointer = awgBuffer.ctypes.data_as(ctypes.POINTER(ctypes.c_int16))
self._status["setSigGenArbitrary"] = ps.ps5000aSetSigGenArbitrary(chandle, 0, 2000000, 0, 0, 0, 0, awgbufferPointer, 1000, 0, 0, 0, 0, 0, 0, 0, 0)
Code: Select all
# Set up single trigger
# handle = chandle
# enabled = 1
source = ps.PS5000A_CHANNEL["PS5000A_CHANNEL_A"]
threshold = int(mV2adc(500,chARange, maxADC))
# direction = PS5000A_ABOVE = 0
# delay = 0 s
# auto Trigger = 0
self._status["trigger"] = ps.ps5000aSetSimpleTrigger(chandle, 1, source, threshold, 0, 0, 0)
Also if someone knows how I could do a square wave for 2 to 3 s in 1V it would be nice.