diff --git a/ADwinProII/labscript_devices_ADwin_modules.py b/ADwinProII/labscript_devices_ADwin_modules.py index 48ff106d522e9bd4cec07a83a5a8b6340288c3dc..b8ac52005abeff6eabe6ec0975deb7320feab5c9 100644 --- a/ADwinProII/labscript_devices_ADwin_modules.py +++ b/ADwinProII/labscript_devices_ADwin_modules.py @@ -379,7 +379,7 @@ class ADwinAO8(_ADwinCard): # - at least once in the end the output is (re)set, otherwise the get_final_values() in the Worker is wrong, # - don't try to also set the target value at the same time, as this would overwrite the target in the ADwin with the PID output. if PID[t]["start"]=="last": - if i_out+1==len(output.all_times): + if i_out+1==len(output.all_times) and output.raw_output[i_out]==100_000: raise LabscriptError(f"{output.name}: You must set the output at the end after turning off PID with 'last'.") elif output.all_times[i_out] == t: raise LabscriptError(f"{output.name}: Don't turn off PID with persitent value ('last') and also set new value.")