Open philipstarkey opened 8 years ago
Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).
If the spinapi can't tell whether a board has been unplugged from normal usage of that board, maybe we can add:
#!python
self.n_boards = pb_count_boards()
to the worker class's __init__()
and:
#!python
if not pb_count_boards() == self.n_boards:
msg = ("Number of pulseblasters connected to this computer has changed.\n" +
"Verify board numbers or reconnect devices and restart the relevant BLACS tabs to continue.")
raise RuntimeError(msg)
to its check_status()
method.
Anything else that comes to mind (like calling pb_select_board()
periodically) seems subject to problems from board numbering changing upon disconnection/reconnection. So all pulseblasters erroring out on a change of the number of devices seems appropriate.
Wanna try adding the above on the lab computer and commit it if it works?
Original report (archived issue) by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).
If you unplug a pulseblaster from the computer, the BLACS tab sits there happily thinking that everything is OK, with check_status running without error. You can even change the state of its flags and BLACS will take around 40 seconds then seemingly time out without an error, leaving the front panel indicating that the flag state has been changed.
While this is almost certainly spinapi's fault, can we work around this so that the tab accurately represents the state of the hardware by giving an error when it is unplugged?