EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: RE: AreaDetector Teledyne driver question
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: David Vine <dvine at sigray.com>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 23 Jun 2022 22:26:32 +0000

Hi David,

 

Ø  You will receive the next valid frame the detector sends out after you call GevWaitForFrame, no frames are buffered prior to this.

 

That does sound like it does not cache even one frame.

 

If your polling loop is this:

 

while (1) {

  getIntegerParam(ADAcquire, &acquire)

  if (acquire ==0) break

  GevWaitForFrame(0.1)

}

 

My guess is that the overhead in this loop is less than 1 microsecond.  If your GevWaitForFrame delay is 0.1 second as shown above, then you will not be ready to receive a frame for 1/100000 of the time.  In other words the probability of missing a frame is 1e-5.  That may be acceptable.

 

Alternatively, does their API offer a way to abort a long exposure?  I that case you can do a long wait, not polling, if that wait will terminate when you abort the exposure.

 

Mark

 

 

 

From: David Vine <dvine at sigray.com>
Sent: Wednesday, June 22, 2022 10:22 PM
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: tech-talk at aps.anl.gov
Subject: Re: AreaDetector Teledyne driver question

 

I will double check but when I asked the manufacturer they said:

 

You will receive the next valid frame the detector sends out after you call GevWaitForFrame, no frames are buffered prior to this.

 

 

 

On Wed, Jun 22, 2022 at 8:15 PM Mark Rivers <rivers at cars.uchicago.edu> wrote:

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. 

 

On Wed, Jun 22, 2022 at 7:18 PM David Vine <dvine at sigray.com> wrote:

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. 

 

On Wed, Jun 22, 2022 at 6:46 PM Mark Rivers <rivers at cars.uchicago.edu> wrote:

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

 

Sent from my iPhone



On Jun 22, 2022, at 7:04 PM, David Vine via Tech-talk <tech-talk at aps.anl.gov> wrote:



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

 

 

 

 

 

Image removed by sender.

 

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

 

Image removed by sender.

 

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

 

Image removed by sender.

 

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


References:
AreaDetector Teledyne driver question David Vine via Tech-talk
Re: AreaDetector Teledyne driver question Mark Rivers via Tech-talk
Re: AreaDetector Teledyne driver question David Vine via Tech-talk
Re: AreaDetector Teledyne driver question David Vine via Tech-talk
Re: AreaDetector Teledyne driver question Mark Rivers via Tech-talk
Re: AreaDetector Teledyne driver question David Vine via Tech-talk

Navigate by Date:
Prev: libusb problem Mark Rivers via Tech-talk
Next: RE: libusb problem Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
Navigate by Thread:
Prev: Re: AreaDetector Teledyne driver question David Vine via Tech-talk
Next: libusb problem Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·