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  <20202021  2022  2023  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: ADAravis JAI camera stops
From: Steve Kinder - UKRI STFC via Tech-talk <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Tue, 21 Apr 2020 16:28:21 +0000
Hi Mark


Indeed it doesn't stop after 100 images whereas the AVT does.

JAI:

$ caget EBT-TST-T20-DIA-CAM-01:CAM:ImageMode
EBT-TST-T20-DIA-CAM-01:CAM:ImageMode Multiple
$ caget EBT-TST-T20-DIA-CAM-01:CAM:ImageMode_RBV
EBT-TST-T20-DIA-CAM-01:CAM:ImageMode_RBV Continuous

AVT:

$ caget EBT-TST-T20-DIA-CAM-03:CAM:ImageMode
EBT-TST-T20-DIA-CAM-03:CAM:ImageMode Multiple
$ caget EBT-TST-T20-DIA-CAM-03:CAM:ImageMode_RBV
EBT-TST-T20-DIA-CAM-03:CAM:ImageMode_RBV Multiple

Steve

________________________________
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: 21 April 2020 17:07:21
To: Kinder, Steve (STFC,DL,TECH)
Cc: EPICS tech-talk
Subject: Re: ADAravis JAI camera stops

Hi Steve,


I realized that my patch will prevent the problem with the camera stopping after NumImages in Continuous mode.  But I believe it will also cause Multiple mode not to work correctly, because it will read back from the camera that it is in Continuous mode and will set ADImageMode_RBV to Continuous.  This will cause ADAravis::run() to not stop after NumImages frames have been received.

Can you please verify that if you set ADImageMode=Multiple and NumImages=100 that the camera does not stop after 100 frames?


If so, I will fix my patch to work around that problem by not setting ADImageMode from the AcquisitionMode readback if any of the 3 modes is not supported by the camera.


Mark



________________________________
From: Steve Kinder - UKRI STFC <steve.kinder at stfc.ac.uk>
Sent: Tuesday, April 21, 2020 10:20 AM
To: Mark Rivers
Cc: EPICS tech-talk
Subject: Re: ADAravis JAI camera stops

Applied the patch and that works fine now.


Many thanks Mark


Steve


________________________________
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: 21 April 2020 15:52:44
To: Kinder, Steve (STFC,DL,TECH)
Cc: EPICS tech-talk
Subject: RE: ADAravis JAI camera stops

> Yes that said Multiple.

That is what I suspected.  So the problem is the logic in ADGenICam.  Even though that camera does not support AcquisitionMode=MultiFrame when ADGenICam reads back the AcquisitionMode feature it translates the enum to ADImageModeMultiple.

I have made a change in ADGenICam that should fix the problem.  You can either try the master branch of ADGenICam or apply this patch.

****************************
diff --git a/GenICamApp/src/GenICamFeature.cpp b/GenICamApp/src/GenICamFeature.cpp
index 85d57a9..0ab35d5 100644
--- a/GenICamApp/src/GenICamFeature.cpp
+++ b/GenICamApp/src/GenICamFeature.cpp
@@ -491,7 +491,12 @@ int GenICamFeature::convertEnum(epicsInt32 inputValue, GCConvertDirection_t dire
                     outputValue = mSet->mAcquisitionModeSingleFrame;
                     break;
                 case ADImageMultiple:
-                    outputValue = mSet->mAcquisitionModeMultiFrame;
+                    // Some cameras, e.g. JAI don't support MultiFrame so we convert to Continuous
+                    if (mSet->mAcquisitionModeMultiFrame != -1) {
+                        outputValue = mSet->mAcquisitionModeMultiFrame;
+                    } else {
+                        outputValue = mSet->mAcquisitionModeContinuous;
+                    }
                     break;
                 case ADImageContinuous:
                     outputValue = mSet->mAcquisitionModeContinuous;
@@ -503,7 +508,8 @@ int GenICamFeature::convertEnum(epicsInt32 inputValue, GCConvertDirection_t dire
 }

 GenICamFeatureSet::GenICamFeatureSet (asynPortDriver *portDriver, asynUser *user)
-: mPortDriver(portDriver), mUser(user), mFeatureMap(), mAsynMap()
+: mPortDriver(portDriver), mUser(user), mFeatureMap(), mAsynMap(),
+  mAcquisitionModeSingleFrame(-1), mAcquisitionModeMultiFrame(-1), mAcquisitionModeContinuous(-1)
 {}

 void GenICamFeatureSet::insert(GenICamFeature *pFeature, string const & name)
****************************


Mark

-----Original Message-----
From: Steve Kinder - UKRI STFC <steve.kinder at stfc.ac.uk>
Sent: Tuesday, April 21, 2020 9:28 AM
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Re: ADAravis JAI camera stops

Yes that said Multiple.


$ caget EBT-TST-T20-DIA-CAM-01:CAM:ImageMode_RBV
EBT-TST-T20-DIA-CAM-01:CAM:ImageMode_RBV Multiple $ caput EBT-TST-T20-DIA-CAM-01:CAM:ImageMode Continuous Old : EBT-TST-T20-DIA-CAM-01:CAM:ImageMode Multiple New : EBT-TST-T20-DIA-CAM-01:CAM:ImageMode Continuous $ caget EBT-TST-T20-DIA-CAM-01:CAM:ImageMode_RBV
EBT-TST-T20-DIA-CAM-01:CAM:ImageMode_RBV Multiple

Still stops after 100 images.

Steve


________________________________
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: 21 April 2020 14:27:37
To: Kinder, Steve (STFC,DL,TECH)
Cc: EPICS tech-talk
Subject: RE: ADAravis JAI camera stops

Your template file shows that the JAI cameras do not support MultipleFrame for the GenICam AcquisitionMode feature.

If you type:

caget EBT-TST-T20-DIA-CAM-01:CAM:ImageMode_RBV

do you see "Multiple"?

If so then the problem is that the logic in ADGenICam does not correctly handle the case where MultipleFrame is not supported, because I was not aware that some cameras did not support that.  That logic is going to need to be improved to handle these cameras.

Mark


-----Original Message-----
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Steve Kinder - UKRI STFC via Tech-talk
Sent: Tuesday, April 21, 2020 8:12 AM
To: Steve Kinder - UKRI STFC <steve.kinder at stfc.ac.uk>; tech-talk at aps.anl.gov
Subject: Re: ADAravis JAI camera stops

A few debug prints lead me to think the problem is associated with ADAravis:run() believing the camera is in image mode, ADImageMultiple, and then stopping after NumImages have been collected. However I believe it is set up in Continuous mode. Perhaps it is down to the generated template for my JAI cameras and the logic in the run method? Please see below:


$ caget EBT-TST-T20-DIA-CAM-01:CAM:GC_AcquisitionMode
EBT-TST-T20-DIA-CAM-01:CAM:GC_AcquisitionMode Continuous ]$ caget EBT-TST-T20-DIA-CAM-01:CAM:GC_AcquisitionMode_RBV
EBT-TST-T20-DIA-CAM-01:CAM:GC_AcquisitionMode_RBV Continuous $ caget EBT-TST-T20-DIA-CAM-01:CAM:NumImages
EBT-TST-T20-DIA-CAM-01:CAM:NumImages 100

record(mbbi, "$(P)$(R)GC_AcquisitionMode_RBV") {
  field(DTYP, "asynInt32")
  field(INP,  "@asyn($(PORT),$(ADDR=0),$(TIMEOUT=1))GC_E_AcquisitionMode")
  field(ZRST, "Continuous")
  field(ZRVL, "0")
  field(ONST, "SingleFrame")
  field(ONVL, "1")
  field(TWST, "SingleFrameReado")
  field(TWVL, "0x10006")
  field(SCAN, "I/O Intr")
  field(DISA, "0")
}

record(mbbo, "$(P)$(R)GC_AcquisitionMode") {
  field(DTYP, "asynInt32")
  field(OUT,  "@asyn($(PORT),$(ADDR=0),$(TIMEOUT=1))GC_E_AcquisitionMode")
  field(DOL,  "0")
  field(ZRST, "Continuous")
  field(ZRVL, "0")
  field(ONST, "SingleFrame")
  field(ONVL, "1")
  field(TWST, "SingleFrameReado")
  field(TWVL, "0x10006")
  field(DISA, "0")
}

The run method sees imageMode as 1 and stops the camera after 100 images.


Steve


________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Steve Kinder - UKRI STFC via Tech-talk <tech-talk at aps.anl.gov>
Sent: 21 April 2020 10:38:50
To: tech-talk at aps.anl.gov
Subject: ADAravis JAI camera stops

I am moving a camera IOC from aravisGigE to ADAravis. Things mostly seem to be working so far. I have 1 * AVT G-235B and 2 * JAI BM141GE on a test IOC. I see no problem with the former so far. I'm seeing slightly confusing hangs with the JAIs though. One of these is being triggered at 10 Hz. It seems to just stop after the ARFramesCompleted PV gets to 100? This also happens when I turn the trigger off and free run at 30Hz. I don't get any messages/errors on the IOC console. If I stop the camera and start again the same thing keeps happening. ADAravis and ADGenICam both 1-2. Any thoughts or advice would be appreciated.


Thanks


Steve


Replies:
RE: ADAravis JAI camera stops Mark Rivers via Tech-talk
References:
ADAravis JAI camera stops Steve Kinder - UKRI STFC via Tech-talk
Re: ADAravis JAI camera stops Steve Kinder - UKRI STFC via Tech-talk
RE: ADAravis JAI camera stops Mark Rivers via Tech-talk
Re: ADAravis JAI camera stops Steve Kinder - UKRI STFC via Tech-talk
RE: ADAravis JAI camera stops Mark Rivers via Tech-talk
Re: ADAravis JAI camera stops Steve Kinder - UKRI STFC via Tech-talk
Re: ADAravis JAI camera stops Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: ADAravis JAI camera stops Mark Rivers via Tech-talk
Next: ci-scripts 2.3.0 available: Windows builds on AppVeyor Ralph Lange 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: ADAravis JAI camera stops Mark Rivers via Tech-talk
Next: RE: ADAravis JAI camera stops 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  <20202021  2022  2023  2024 
ANJ, 21 Apr 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·