genicam / harvesters

Image Acquisition Library for GenICam-based Machine Vision System
Apache License 2.0
513 stars 88 forks source link

How to abort acquisition? #392

Open MasIgor opened 1 year ago

MasIgor commented 1 year ago

hello!

I have a genie nano, triggered by a digital trigger.

Currently I have my cycle like this:

with self.ia.try_fetch(timeout=0.7) as buffer:

It works great, but I would need to remove the timeout, and still be able to abort the waiting if needed. sometimes the trigger arrives after 20 seconds, or even more. but if I detect a certain condition, I would need to exit the waiting as the cycle has been aborted. Can this be done somehow? Just sit there waiting, if trigger arrive procede with the code, if "abort" arrives continue with the code too...

any help is greatly appreciated.

best regards