Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLACS doesn't notice when a PulseBlaster has been unplugged #15

Open
philipstarkey opened this issue Jan 13, 2016 · 1 comment
Open
Labels
bug Something isn't working minor

Comments

@philipstarkey
Copy link
Member

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?

@philipstarkey
Copy link
Member Author

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?

@philipstarkey philipstarkey added minor bug Something isn't working labels Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor
Projects
None yet
Development

No branches or pull requests

1 participant