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

Timeout, or abort, needed for proper trigger support #146

Open
drmcnelson opened this issue Jan 19, 2022 · 5 comments
Open

Timeout, or abort, needed for proper trigger support #146

drmcnelson opened this issue Jan 19, 2022 · 5 comments

Comments

@drmcnelson
Copy link

drmcnelson commented Jan 19, 2022

spectrometer and system information

USB2000, etc - all models with external trigger capability

current problem

To adequately support triggered operation, the API to retrieve spectra, absolutely needs to have a timeout parameter, or at least a way to abort the intensities() call while it is waiting for a trigger.

@drmcnelson drmcnelson changed the title Timeout needed for proper trigger support Timeout, or abort, needed for proper trigger support Jan 19, 2022
@ap--
Copy link
Owner

ap-- commented Jan 20, 2022

Hi @drmcnelson,

This will be a bit more involved. It's possible to change the pyseabreeze backend to allow pass-through of a timeout value. For the cseabreeze backend these USB timeouts are hardcoded, so it'll involve more work to implement.

I will implement the functionality for pyseabreeze first.
But I'm currently pretty overloaded with work, so this is a very low priority right now.

I'll update this issue when I start work on this.
I can also give some guidance on how to implement this feature, if someone volunteers to work on a PR.

Cheers,
Andreas 😃

@drmcnelson
Copy link
Author

Yes, I saw where it would go in the pyseabreeze code. An abort could be a useful alternative for some use cases.

@ap--
Copy link
Owner

ap-- commented Aug 7, 2022

Note to self: It seems there's no easy hacky way to do this with the sync interface: https://libusb.sourceforge.io/api-1.0/libusb_io.html#sync

@drmcnelson
Copy link
Author

Yes, it looks messy. The comment that they need to be called to handle events seems a little concerning.

I have been using the device in triggered mode for clocked data acquisitions. So I'm getting along with out it for the moment.

Thank you for looking into it.

@drmcnelson
Copy link
Author

user space thread to implement a watchdog timer? (provided the overhead is small)

But again, I don't want to cause you extra work. It has been working very well as is, for my clocked data acquisitions.

At this point, I am pretty sure I would not change my code to use the timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants