And if the frame arrives when I’m not waiting I need to know to send another trigger.
Are you sure about that? That is not how I would expect that function to work. I would expect that is there is a frame available that you have not yet read it would return it to you.
Mark
Sent from my iPhone
On Jun 22, 2022, at 9:29 PM, David Vine <dvine at sigray.com> wrote:
The scheme you describe might be the best option. But it will miss a certain percentage of frames and I guess I’ll just have to work around that.
Yes but there’s a possibility the frame arrives when I’m not in that function.
The polling loop would need to:
getIntegerParam(ADAcquire, &acquire)
If (acquire ==0) break
GevWaitForFrame()
And if the frame arrives when I’m not waiting I need to know to send another trigger.
Hi David,
Can you call GevWaitForFrame(timeout) with a short timeout? If so then can’t that thread just poll with a short timeout. It should abort the polling loop if any of the following happens:
- It receives the frame OK
- It receives an abort signal
- It has been polling for significantly longer than the exposure time.
Mark
Hi all,
I wrote a driver for the Teledyne Shadobox 6k flat panel detector.
The API has a function called GevWaitForFrame(timeout) which must be being executed by the driver when a frame arrives from the camera or the frame will be missed. Are there any examples of a driver that has a similar API?
The problem is that it creates a race condition so if I execute the code sequentially:
send trigger
GevWaitForFrame(1 second)
It's possible for the frame to arrive before I'm "waiting" for it. Right now I have two threads that receive epicsEventSignal - one to send the trigger and one to wait.
That works ok but since I can't abort the GevWaitForFrame the driver gets out of sync for longer exposures. Eg I have a 5 second exposure so I set a 7 second timeout but then abort after 1 second my wait thread is stuck for 6 seconds.
I haven't had a camera API work like this before so any examples would be really helpful.
Thanks,
David
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received
this email in error, please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute or copy this email. Please notify
the sender immediately by email if you have received this email by mistake and delete this email from your system. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents
of this information is strictly prohibited
![]()
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received
this email in error, please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute or copy this email. Please notify
the sender immediately by email if you have received this email by mistake and delete this email from your system. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents
of this information is strictly prohibited
|