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

Siglent: Retrigger after waveforms have been captured #137

Merged
merged 5 commits into from
Jun 3, 2020

Conversation

tomverbeure
Copy link
Contributor

No description provided.

In addition to retriggering, I also reduced the scope of lock(m_mutex)
to just the acquisition phase, just as it is done for the LeCroy scope.

This increases the responsiveness of the STOP button such that it reacts
immediately to the event. Without it, there are 4 or more AcquireData
calls before the STOP button event kicks in. During that time, the
LeCroyOscilloscope::Stop() is stalled at the lock(m_mutex) phase.
@tomverbeure
Copy link
Contributor Author

So this code works fine with USBTMC, but hangs when using Lxi. It seems to be because there are 2 different threads issuing lxi requests:

  • the AcquireData thread does a retrigger
  • the gui thread calls GetVoltageRange

How is this done with LeCroy and the lan driver?

Is the issue that the Lxi library isn't reentrant?

If so, what's the solution? Do we need a new Transport method that combines SendCmd and Reply and make that atomic?

Sorry, something went wrong.

@tomverbeure
Copy link
Contributor Author

By regrabbing the m_mutex before retriggering, concurrent Lxi library requests are avoided again, and things work. I think this is the right solution.

But it raises the question: isn't there a m_mutex grab missing in LeCroy code?
https://github.com/azonenberg/scopehal/blob/f790a73e598dd15c3321f790bf3cf115e1625d3f/scopehal/LeCroyOscilloscope.cpp#L1461

Sorry, something went wrong.

@azonenberg
Copy link
Collaborator

azonenberg commented Jun 3, 2020

Good catch re the mutex grab in the LeCroy driver. Yes, that's a bug. Fixed in 3623e1b.

Sorry, something went wrong.

@azonenberg azonenberg merged commit c45d7b5 into ngscopeclient:master Jun 3, 2020
@tomverbeure tomverbeure deleted the retrigger branch June 3, 2020 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants