In the function acq_data() the following two code segments need to swap order, otherwise the call to buff_string = self.rx_txt() after the second code block fails.
# Determine the output data
if start is not None and end is not None:
self.tx_txt(f"ACQ:SOUR{chan}:DATA:STArt:End? {start},{end}")
elif start is not None and num_samples is not None:
self.tx_txt(f"ACQ:SOUR{chan}:DATA:STArt:N? {start},{num_samples}")
elif old and num_samples is not None:
self.tx_txt(f"ACQ:SOUR{chan}:DATA:Old:N? {num_samples}")
elif last and num_samples is not None:
self.tx_txt(f"ACQ:SOUR{chan}:DATA:LATest:N? {num_samples}")
elif trig_pos is not None and num_samples is not None:
self.tx_txt(f"ACQ:SOUR{chan}:DATA:TRig? {num_samples},{trig_pos.value}")
else:
self.tx_txt(f"ACQ:SOUR{chan}:DATA?")
# Get data type from Red Pitaya
units = self.txrx_txt('ACQ:DATA:Units?')
data_format = self.txrx_txt("ACQ:DATA:FORMAT?")
self.check_error()
In the function acq_data() the following two code segments need to swap order, otherwise the call to
buff_string = self.rx_txt()after the second code block fails.