diff --git a/qcodes_contrib_drivers/drivers/Keysight/SD_common/SD_AWG_Async.py b/qcodes_contrib_drivers/drivers/Keysight/SD_common/SD_AWG_Async.py index 59d005346..0cdac4fc1 100644 --- a/qcodes_contrib_drivers/drivers/Keysight/SD_common/SD_AWG_Async.py +++ b/qcodes_contrib_drivers/drivers/Keysight/SD_common/SD_AWG_Async.py @@ -445,15 +445,16 @@ def _init_awg_memory(self): self.log.info(f'Reserving awg memory for {len(new_slots)} slots') zeros = [] + wave = None total_size = 0 total_duration = 0 for slot in new_slots: start = time.perf_counter() - if len(zeros) != slot.size: + if len(zeros) != slot.size or wave is None: zeros = np.zeros(slot.size, np.float) wave = keysightSD1.SD_Wave() result_parser(wave.newFromArrayDouble(keysightSD1.SD_WaveformTypes.WAVE_ANALOG, zeros)) - super().load_waveform(wave, slot.number) + super().load_waveform(wave, slot.number) duration = time.perf_counter() - start total_duration += duration total_size += slot.size