diff --git a/ADwinProII/blacs_workers.py b/ADwinProII/blacs_workers.py index bf67faa5b999c60626f58f3b2bbb8527a226f508..f5956cd4cb05a69dec1d69623708ae502a32e2f0 100644 --- a/ADwinProII/blacs_workers.py +++ b/ADwinProII/blacs_workers.py @@ -143,7 +143,7 @@ class ADwinProIIWorker(Worker): # Send stop time to ADwin self.adw.Set_Par(2, int(self.stop_time * CLOCK_T12 / self.PROCESSDELAY)) # Send wait time and timeout to ADwin (default 0 if no waits) - self.adw.Set_Par(3, group.attrs.get("wait_time",0)) + self.adw.Set_Par(3, group.attrs.get("wait_time",-1)) self.adw.Set_Par(5, group.attrs.get("wait_timeout",0)) # Send data to ADwin AOUT = group["ANALOG_OUT/VALUES"] @@ -160,7 +160,7 @@ class ADwinProIIWorker(Worker): self.smart_cache[name] = DOUT[:] self.adw.SetData_Long(DOUT["n_cycles"], module, 1, DOUT.shape[0]) self.adw.SetData_Long(DOUT["bitfield"], module+1, 1, DOUT.shape[0]) - self.adw.Set_Par(module-1, DOUT.attrs.get("wait_time",0)) + self.adw.Set_Par(module-1, DOUT.attrs.get("wait_time",-1)) PIDs = group["ANALOG_OUT/PID_CHANNELS"] if fresh or not np.array_equal(PIDs[:],self.smart_cache["PIDs"]): print("PIDs programmed.") diff --git a/ADwinProII/labscript_devices.py b/ADwinProII/labscript_devices.py index c727013794f06926f9b623995f755beff20169df..f7697e7fa264cdf94b5886bb499e88994221862f 100644 --- a/ADwinProII/labscript_devices.py +++ b/ADwinProII/labscript_devices.py @@ -198,8 +198,10 @@ class ADwinProII(PseudoclockDevice): def do_checks(self, outputs): - if len(self.trigger_times)>2 or self.trigger_times[1] not in compiler.wait_table: - raise NotImplementedError('ADwin does not support retriggering, and only supports one "wait" in the current implementation.') + if len(self.trigger_times)>1: + # Either only one software trigger (for starting shot as master pseudoclock), or two (where the second one is for the 'wait') + if len(self.trigger_times)==2 and self.trigger_times[1] not in compiler.wait_table: + raise NotImplementedError('ADwin does not support retriggering, and only supports one "wait" in the current implementation.') for output in outputs: output.do_checks(self.trigger_times)