EPICS Home

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  <20132014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: pilatus detecotr modify FileName problem
From: 洪春霞 <hongchunxia@sinap.ac.cn>
To: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Wed, 11 Dec 2013 03:32:31 +0000
Hello everyone,


Now we use CSS(Control System Studio) to control a Pilatus Detector. The platform is base-3.14.12.3, synApps_5_6 and CSS_3.1.6, the driver of Pilatus Detector is from synApps_5_6.

When I use the softioc and the CSS opi to control the Detector, it works well and no problem, but now I have a python script to modify the detector’s Filename and Filename readback for exposing some different samples. That is, when I execute the python script it can modify the record X16B:EH:13PIL1:cam1:Filename and X16B:EH:13PIL1:cam1:Filename_RBV automaticly, the python is as followssample.py:

 

#!/usr/bin/env python

from epics import caget,caput

caput(' X16B:EH:13PIL1:cam1:FileName',sample_name)

caput(' X16B:EH:13PIL1:cam1:FileName_RBV',sample_name)

……


The sample_name is from the css opi for different sample’s name, for example,in a experiment you can do six samples, that is, the sample.py will be run for six times.

The problem is, if the first sample name is sample1, the python can modify the two record, and the detector file name will be sample1_0001.tif, it works well. But when I set the second sample’s name is s2, the detector file name will be s2mple1_0002.tif, which is not I wanted. That is , the first two letter is replaced by s2, but the sample’s name is not replaced all. I don’t know why.

When I open a terminal in linux, and input python, and then run statement of the sample.py line by line, the problems is the same. That is to say, if the next sample’s name is shorter than former, the question is exist, on the contrary, it’s ok.


I don't know how to solve the problem. Thank you.


---------------------------------------------
hongchunxia
Shanghai Synchrotron Radiation Facility
Shanghai Institute of Applied Physics
Chinese Academy of Sciences

Replies:
Re: pilatus detecotr modify FileName problem Matt Newville
RE: pilatus detecotr modify FileName problem nick.rees

Navigate by Date:
Prev: RE: ai records: pool (SCAN) VS pull (FLNK) VS push (some examples) Emmanuel Mayssat
Next: Re: pilatus detecotr modify FileName problem Matt Newville
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: RE: ai records: pool (SCAN) VS pull (FLNK) VS push (some examples) Emmanuel Mayssat
Next: Re: pilatus detecotr modify FileName problem Matt Newville
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019