However in practice, when we try this instead of seeing the signal come every 40 microseconds, we see a signal appear every ~500 microseconds. We then varied the input trigger time and we did not see the red pitaya fire on every trigger until our tigger was slower than 1 per 500 microseconds (i.e. a 600 microsecond trigger would show pulses every 600; anything shorter would always appear at 500). The output wavform appears correct both in frequency and length.
We tried this both with arbitrary waveforms and simple sine waves with the exact same results. It appears to me that there is a 500us rearm time for the AWG. Does anyone know if this is true, and if so have you been able to circumvent/fix it?
The test code was as follows.
Code: Select all
import numpy as np
import matplotlib.pyplot as plt
cav = SomeObject()
cav.rp.write('GEN:RST')
cav.rp.write('SOUR1:FUNC ARBITRARY')
cav.rp.write('SOUR1:TRIG:SOUR EXT_PE')
f1 = 10 #MHz
f2 = 20 #MHz
pulselen = 1 #microseconds
samplerate = 125 #MS/s
time = np.arange(0, pulselen, 1/samplerate)
pulse = np.sin(2*np.pi*(f1*time + (f2-f1)*time**2/(2*pulselen)))
waveform = ''
for c in pulse:
waveform += '%1.5f,' %c
waveform = waveform[:-1]
cav.rp.write('SOUR1:TRAC:DATA:DATA %s' % waveform)
cav.rp.write('SOUR1:FREQ:FIX 7500')
cav.rp.write('SOUR1:VOLT 1')
cav.rp.write('OUTPUT1:STATE ON')