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  <20152016  2017  2018  2019  2020  2021  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  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Help-areaDetector used for Pilatus
From: Mark Rivers <[email protected]>
To: GONG Yu <[email protected]>, EPICS_tech_talk <[email protected]>
Date: Fri, 17 Apr 2015 10:54:10 +0000
I apologize my original message had 2 typos, it should be:

The next sequence you collect will be:

/home/me/test2_00000.tif
/home/me/test2_00001.tif
...
/home/me/test2_00009.tif

The "2" in this case is the FileNumber, and comes from the areaDetector driver. The 00000, 00001, etc. come from camserver.

Mark


________________________________________
From: Mark Rivers
Sent: Thursday, April 16, 2015 10:49 PM
To: GONG Yu; EPICS_tech_talk
Subject: RE: Help-areaDetector used for Pilatus

Hi GongYu,

> **question1:  epicsEnvSet("QSIZE",  "20")
>  what does QSIZE mean? What number should I set to it or just using default 20?

It is the size of the input queue for the plugins.  20 is probably fine unless you are collecting bursts of data faster than your file saving plugin can write, and then a larger queue can be useful.

> **question2:  epicsEnvSet("NCHANS", "2048")
>  what does NCHANS mean? What number should I set to it or just using default 2048?

It is the number of time series points used for the statistics plugins.  2048 is probably fine.

Note that in ADPilatus R2-1, which was released earlier today, I have added comments to each of those lines to help explain what those environment variables do.  This is from the new st.cmd example file:

#################################
# Prefix for all records
epicsEnvSet("PREFIX", "13PIL1:")
# The port name for the detector
epicsEnvSet("PORT",   "PIL")
# The queue size for all plugins
epicsEnvSet("QSIZE",  "20")
# The maximim image width; used for row profiles in the NDPluginStats plugin
epicsEnvSet("XSIZE",  "487")
# The maximim image height; used for column profiles in the NDPluginStats plugin
epicsEnvSet("YSIZE",  "195")
# The maximum number of time series points in the NDPluginStats plugin
epicsEnvSet("NCHANS", "2048")
# The maximum number of frames buffered in the NDPluginCircularBuff plugin
epicsEnvSet("CBUFFS", "500")
# The search path for database files
epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(ADCORE)/db")
#################################


< **question3: when I exposure single image, namely the parameters [# Images] 1, [Auto increment] Yes,
> I press [start] the [Next file #] (shown in blue color beside the box) is auto incremented which is as I expected;
> But if I  set [#Images] 10 and [Auto increment] Yes to exposure multy images,
> after I press [start], the numbers followed  the file name in name of image files are correct (such as from 000 to 009),
> but the [Next file#] (shown in blue  color beside the box) is auto incremented only once (such as from 000 to 001,
> but not incremented anymore). Is   this situation abnormal ?

That is normal.  The ADPilatus documentation here explains it, look in table entry for NDFileTemplate here:

http://cars.uchicago.edu/software/epics/pilatusDoc.html


The FileNumber record is incremented once for each acquisition "sequence".  Within a sequence camserver itself numbers the files, using its own rules that are explained the pilatusDoc.html.  If you set the following:

FilePath="/home/me/"
FileName="test"
FileNumber=1
FileTemplate="%s%s%d_.tif"
AutoIncrement=Yes

then when you collect a sequence of 10 images camserver will create files

/home/me/test1_00000.tif
/home/me/test1_00001.tif
...
/home/me/test1_00009.tif

The next sequence you collect will be:

/home/me/test2_00000.tif
/home/me/test3_00001.tif
...
/home/me/test3_00009.tif

It is a very good idea to have your file template end in "_.tif", because that trailing underscore has special meaning for camserver.  It will put its numbers after that underscore.  If you don't use the underscore it can be quite confusing, because it will start its sequence with the FileNumber and then the AutoIncrement may even cause files to be overwritten.

Mark


________________________________________
From: [email protected] [[email protected]] on behalf of GONG Yu [[email protected]]
Sent: Thursday, April 16, 2015 9:49 PM
To: EPICS_tech_talk
Subject: Help-areaDetector used for Pilatus

Hello everyone,
  Recently I use areaDetector to control pilatus3 detector, but I am not sure if the parameters in st.cmd were set correctly. In st.cmd scripts,
**question1:  epicsEnvSet("QSIZE",  "20")
  what does QSIZE mean? What number should I set to it or just using default 20?
**question2:  epicsEnvSet("NCHANS", "2048")
  what does NCHANS mean? What number should I set to it or just using default 2048?

  in areaDetector.adl main screen, I also have a problem:
**question3: when I exposure single image, namely the parameters [# Images] 1, [Auto increment] Yes, I press [sta  rt] the [Next file #] (shown in blue color beside the box) is auto incremented which is as I expected; But if I  set [#Images] 10 and [Auto increment] Yes to exposure multy images, after I press [start], the numbers followed  the file name in name of image files are correct (such as from 000 to 009), but the [Next file#] (shown in blue  color beside the box) is auto incremented only once (such as from 000 to 001, but not incremented anymore). Is   this situation abnormal ?
**Some parameters related to Pilatus3 is as below
  number of modules                 3x8=24
  pixel size                        172x172   μm^2
  format                            1475x1679=2476525  pixels
  Dynamic range                     20        Bits (0: 1048573)
  Counter overflow state            1048573
  readout time                      0.95      ms
  Framming rate                     250       Hz
  (camserver is in a computer with IP 10.10.10.100, areaDetector is in another computer with IP 10.10.10.10.)

**The contents in st.cmd are listed below
----------------------------------------------------------------------------------------------------------------
< envPaths
errlogInit(20000)

dbLoadDatabase("$(TOP)/dbd/pilatusDetectorApp.dbd")
pilatusDetectorApp_registerRecordDeviceDriver(pdbbase)

epicsEnvSet("PREFIX", "13PIL1:")
epicsEnvSet("PORT",   "PIL")
epicsEnvSet("QSIZE",  "20")
epicsEnvSet("XSIZE",  "1475")
epicsEnvSet("YSIZE",  "1679")
epicsEnvSet("NCHANS", "2048")

###
# Create the asyn port to talk to the Pilatus on port 41234.
drvAsynIPPortConfigure("camserver","10.10.10.100:41234")
# Set the input and output terminators.
asynOctetSetInputEos("camserver", 0, "\030")
asynOctetSetOutputEos("camserver", 0, "\n")

pilatusDetectorConfig("$(PORT)", "camserver", $(XSIZE), $(YSIZE), 0, 0)
dbLoadRecords("$(ADCORE)/db/ADBase.template", "P=$(PREFIX),R=cam1:,PORT=$(PORT),ADDR=0,TIMEOUT=1")
dbLoadRecords("$(ADCORE)/db/NDFile.template", "P=$(PREFIX),R=cam1:,PORT=$(PORT),ADDR=0,TIMEOUT=1")
dbLoadRecords("$(ADPILATUS)/db/pilatus.template","P=$(PREFIX),R=cam1:,PORT=$(PORT),ADDR=0,TIMEOUT=1,CAMSERVER_PORT=camserver")

# Create a standard arrays plugin
NDStdArraysConfigure("Image1", 5, 0, "$(PORT)", 0, 0)
dbLoadRecords("$(ADCORE)/db/NDPluginBase.template","P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0")
dbLoadRecords("$(ADCORE)/db/NDStdArrays.template", "P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,TYPE=Int32,FTVL=LONG,NELEMENTS=2476525")

# Load all other plugins using commonPlugins.cmd
< $(ADCORE)/iocBoot/commonPlugins.cmd
set_requestfile_path("$(ADPILATUS)/pilatusApp/Db")

#asynSetTraceMask("$(PORT)",0,255)
#asynSetTraceMask("$(PORT)",0,3)


iocInit()

# save things every thirty seconds
create_monitor_set("auto_settings.req", 30,"P=$(PREFIX)")
---------------------------------------------------------------------------------------------------------------
I hope someone could help me. Thank you!


GongYu



References:
Help-areaDetector used for Pilatus GONG Yu
RE: Help-areaDetector used for Pilatus Mark Rivers

Navigate by Date:
Prev: RE: Gentec S-link power meter problem with ending I/O interrupt measurement bohmm
Next: Re: Re: iocStats reboot question Silver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Help-areaDetector used for Pilatus Mark Rivers
Next: iocStats reboot question Silver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·