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: Re: Re: NDPluginStats show the same statistics results and ADViewer displays no image
From: Zhibang Shen via Tech-talk <tech-talk at aps.anl.gov>
To: "mark rivers" <rivers at cars.uchicago.edu>
Cc: tech-talk at aps.anl.gov
Date: Mon, 18 May 2020 22:54:42 +0800 (GMT+08:00)
Hello Mark,

Thank you very much for your help. NDStats and ADViewer problems are perfectly solved by running NTP.

The aqcuisition time I am using is never more than 1 second. Maybe next time this situation happens I can compare the modified time of the last file with the error printing time, and see what message camserver shows.

Zhibang


> -----原始邮件-----
> 发件人: "Mark Rivers" <rivers at cars.uchicago.edu>
> 发送时间: 2020-05-18 20:56:18 (星期一)
> 收件人: "shenzb at ihep.ac.cn" <shenzb at ihep.ac.cn>
> 抄送: tech-talk <tech-talk at aps.anl.gov>
> 主题: Re: Re: NDPluginStats show the same statistics results and ADViewer displays no image
> 
> 
> Hi Zhibang,
> 
> The NDPluginStats problem is easy.  Each of your NDPluginStats plugins is configured the same, with their ArrayPort PV set to PIL.  That setting is in the upper left of the screen.  You need to change PIL to ROI1, or ROI2, etc.  That tells the plugin where to get its data from.  Right now all of them are getting their data from PIL, which is the entire detector.  You want each plugin to get its data from a different ROI.
> 
> The only way that ADPilatus can get data from camserver is to read the file that camserver writes.  There is a possibility that the new file you are collecting has the same name as an old file that already exists.  ADPilatus tests for that with this logic in waitForFileToExist().
> 
>             /* We allow up to 10 second clock skew between time on machine running this IOC
>              * and the machine with the file system returning modification time */
>             if (difftime(statBuff.st_mtime, acqStartTime) > -10) break;
>             close(fd);
>             fd = -1;
> 
> This logic says that is the modification time of the file minus the acquisition start time is greater than -10 seconds then it is OK and takes the break.  If the difference is less than -10 that means that the file was created more than 10 seconds before acquisition started, so it is stale.  The 10 second threshold allows for a small amount of clock skew.  It only tries this once, it does not repeatedly call that function waiting for a newer file to appear.
> 
> You can see that this logic will fail if you try to collect data using the name of an existing file that is more than 10 seconds old.  Is it possible that is what you are doing?  What acquisition time are you using when you see this problem?
> 
> Mark
> 
> 
> 
> 
> 
> ________________________________
> From: shenzb at ihep.ac.cn <shenzb at ihep.ac.cn>
> Sent: Monday, May 18, 2020 2:35 AM
> To: Mark Rivers
> Cc: tech-talk
> Subject: Re: Re: NDPluginStats show the same statistics results and ADViewer displays no image
> 
> Hello Mark,
> 
> Thank you for your reply. The screenshots are attached.
> 
> [cid:_Foxmail.1@98cda0f2-bbec-33bf-69e4-a3e40777a4cd]
> [cid:_Foxmail.1@72633f7f-a3c1-4b31-3110-a468528987b4]
> 
> As for the clock synchronization problem, I totally understand your advice. We are now storing image files in the server running camserver. AreaDetector/ADPilatus is also running on the same server. But the clock synchronization error is still thrown out occasionally (one time among 100 exposures?). I don't know if there is clock synchronization issue on one computer.
> 
> While saving files in NFS, the clock synchronization error seemed not printed, because the pv $(P)$(R)Acquire was not stuck as "Collecting" for a long time. Clock might be part of the reason, I will try running NTP first.
> 
> Thank you again for your help.
> 
> 
> Zhibang
> 
> From: Mark Rivers<mailto:rivers at cars.uchicago.edu>
> Date: 2020-05-18 11:31
> To: shenzb at ihep.ac.cn<mailto:shenzb at ihep.ac.cn>
> CC: EPICS tech-talk<mailto:tech-talk at aps.anl.gov>
> Subject: Re: NDPluginStats show the same statistics results and ADViewer displays no image
> 
> Hi Zhibang,
> 
> > I found that the 5 NDPluginStats showed same net value, same total value, same max value.... But I am sure the 4 ROIs were set successfully and they did not a share public zone. It seemed all 5 NDPluginStats showed the statistics of the whole image. I don't know why it happened. Also I tried NDPluginROIStat, which seemed not working either.
> 
> 
> Please send screen shots of each of the NDPluginStats screens and each of the NDPluginROI screens.
> 
> 
> > Another question is about an error printed after exposure. It said file exists but is more than 10 seconds old, possible clock synchronization problem.
> 
> That means that when ADPilatus tried to read the file it existed but was more than 10 seconds old.  It checks that to prevent getting old stale data.  This normally means that your file server and the computer running ADPilatus do not have their clocks synchronized.  Make sure that both machines are running NTP and that their clocks agree.
> 
> I suspect this is also the problem with your ADViewers.  ADPilatus is not successfully reading the image when it is on an NFS server, because your NFS server and the ADPilatus machine clocks are not synchronized.  You need to fix that problem, and then I suspect the other problems will go away.
> 
> Mark
> 
> 
> ________________________________
> From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of shenzb--- via Tech-talk <tech-talk at aps.anl.gov>
> Sent: Sunday, May 17, 2020 10:06 PM
> To: tech-talk
> Subject: NDPluginStats show the same statistics results and ADViewer displays no image
> 
> Hello everyone,
> 
> I am using areaDetector(R3.3.1)/ADPilatus(R2.7), but there are quite a lot problems. I would like to ask for your generous help.
> 
> I found that the 5 NDPluginStats showed same net value, same total value, same max value.... But I am sure the 4 ROIs were set successfully and they did not a share public zone. It seemed all 5 NDPluginStats showed the statistics of the whole image. I don't know why it happened. Also I tried NDPluginROIStat, which seemed not working either.
> 
> Another question is about an error printed after exposure. It said file exists but is more than 10 seconds old, possible clock synchronization problem. During a scan, it went stuck when this error was thrown out; and I clicked the Stop button on pilatusDetector.adl to move it on. Might it because the detector was not ready for the next exposure? And could I write a script to automatically set $(P)$(R)Acquire "Done" while it occurs? Will there be any disastrous consequence if I do so?
> 
> Finally, it is a problem with ADViewers(R1.5). Actually I am trying to use NFS storing all datas collected by different devices. However, no image was shown by EPICS_AD_Viewer after exposure when I set the pilatus file path an NFS path. EPICS_AD_Viewer was able to detect the image pv and no error was printed in log. When the pilatus files were stored locally, everything worked well. How can I fix this problem?
> 
> Thanks in advance.
> 
> 
> ________________________________
> Best regards,
> --
> Zhibang Shen
> Institute of High Energy Physics, Chinese Academy of Sciences
> 19B Yuquan Road, Shijingshan District, Beijing, China
> 100049

References:
NDPluginStats show the same statistics results and ADViewer displays no image shenzb--- via Tech-talk
Re: NDPluginStats show the same statistics results and ADViewer displays no image Mark Rivers via Tech-talk
Re: Re: NDPluginStats show the same statistics results and ADViewer displays no image Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: pco Camera USB and IEEE interface Bradnick, Ben (Tessella, RAL, TEC) via Tech-talk
Next: Re: pco Camera USB and IEEE interface 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 
Navigate by Thread:
Prev: Re: Re: NDPluginStats show the same statistics results and ADViewer displays no image Mark Rivers via Tech-talk
Next: BASE 7.0.x@Windows_64 - Channel Access Context in shared library - "ca_context_destroy bug" Carsten Winkler 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, 18 May 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·