Skip to content

Commit 08874c9

Browse files
committed
Add "ready" check for device-side error handling
1 parent a9b94fe commit 08874c9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

labscript_devices/PrawnBlaster/blacs_workers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,10 @@ def transition_to_buffered(self, device_name, h5file, initial_values, fresh):
340340
if (fresh or self.smart_cache[pseudoclock] is None) and self.fast_serial:
341341
print('binary programming')
342342
self.prawnblaster.write(b"setb %d %d %d\r\n" % (pseudoclock, 0, len(pulse_program)))
343+
response = self.prawnblaster.readline().decode()
344+
assert (
345+
response == "ready\r\n"
346+
), f"PrawnBlaster said '{response}', expected 'ready'"
343347
program_array = np.array([pulse_program['half_period'],
344348
pulse_program['reps']], dtype='<u4').T
345349
self.prawnblaster.write(program_array.tobytes())

0 commit comments

Comments
 (0)