Exopy / exopy_hqc_legacy

Transition package to smooth transition from HQCMeas to Exopy.
BSD 3-Clause "New" or "Revised" License
0 stars 10 forks source link

ADQ14 checks are stupid #50

Closed lcontami closed 5 years ago

lcontami commented 6 years ago

When a measurement is already running, the checks fail since they try to open the connection.

Traceback (most recent call last):
  File "c:\users\hqc\documents\tino\exopy_hqc_legacy\exopy_hqc_legacy\instruments\starters\legacy_starter.py", line 36, in check_infos
    driver = driver_cls(c)
  File "c:\users\hqc\documents\tino\exopy_hqc_legacy\exopy_hqc_legacy\instruments\drivers\dll\sp_adq14.py", line 100, in __init__
    self.open_connection()
  File "c:\users\hqc\documents\tino\exopy_hqc_legacy\exopy_hqc_legacy\instruments\drivers\dll\sp_adq14.py", line 115, in open_connection
    b_id = cu.setup_board(i)
  File "c:\users\hqc\documents\tino\exopy_hqc_legacy\exopy_hqc_legacy\instruments\drivers\dll\sp_adq14.py", line 57, in setup_board
    board_id)()
AssertionError
MatthieuDartiailh commented 6 years ago

This should not happen since when a measurement is running the profile of the card should not be available and the check should be skipped.

lcontami commented 5 years ago

Do you have an idea of why the checks are called ? Are not all the instruments using the same legacy starter ?

MatthieuDartiailh commented 5 years ago

This occurs when enqueuing a new measurement while one is running correct ? The checks on the tasks are always called but the connection to the instrument is checked only if the instrument profile is part of the run_time infos. To debug this I would suggest the following:

Depending on those we will have to explore different directions.

lcontami commented 5 years ago

Actually I just realized it happens when you enqueue a new measurement while one is running STARTING FROM THE SECOND you enqueue. Meaning you can enqueue one but not two. So i guess it has something to do with the way the checks are skipped ? I have not read your insights yet Madar, just wanted to update this asap, but I will try and find time !

MatthieuDartiailh commented 5 years ago

That's interesting ! Now it sounds more like a bug in the management of the dependencies. It also means that I can investigate without having the instrument. The card is stricter than other instruments, which is why we only see the bug with it. My guess is that we release all the resources we tried to collect no matter whether we got them or not, which is a bad idea. I think that most of the logic is in Measurement. I may have some time tonight, I will try to give it a look.

MatthieuDartiailh commented 5 years ago

This should be fixed by https://github.com/Exopy/exopy/pull/161