Skip to content
Snippets Groups Projects
Commit aebf58dc authored by Sander de Snoo's avatar Sander de Snoo
Browse files

Improved 'wait_until_AWG_idle()'. Replaced spinning while by while with sleep of 1ms.

parent 6866bb93
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,10 @@ class M3202A_Uploader:
def __upload_to_awg(self, channel_name, waveform):
# vmin = waveform.min()
# vmax = waveform.max()
# length = len(waveform)
# logging.debug(f'{channel_name}: V({vmin*1000:6.3f}, {vmax*1000:6.3f}) {length}')
(awg_name, channel) = self.channel_map[channel_name]
awg = self.AWGs[awg_name]
wave_ref = awg.upload_waveform(waveform)
......@@ -184,9 +188,8 @@ class M3202A_Uploader:
awg_name, channel = next(iter(self.channel_map.values()))
awg = self.AWGs[awg_name]
idle = 1 # 1 is False
while idle == 1:
idle = awg.awg_is_running(channel)
while awg.awg_is_running(channel):
time.sleep(0.001)
@dataclass
......
......@@ -250,9 +250,8 @@ class keysight_uploader():
awg_name, channel = next(iter(self.channel_map.values()))
awg = self.AWGs[awg_name]
idle = 1 # 1 is False
while idle == 1:
idle = awg.awg.AWGisRunning(channel)
while awg.awg.AWGisRunning(channel):
time.sleep(0.001)
class upload_job(object):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment