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 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 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: pilatus detecotr modify FileName problem |
From: | <[email protected]> |
To: | <[email protected]>, <[email protected]> |
Date: | Wed, 11 Dec 2013 08:59:51 +0000 |
Hi hongchunxia, I suspect it is getting confused between byte arrays of waveform records and strings. I suspect the X16B:EH:13PIL1:cam1:FileName PV is a waveform record, and
the EPICS Python library you are using doesn’t realise you are actually putting a string to it and so isn’t terminating the data with a null character. I am not familiar with the python library you are using, but you need the equivalent of the –S option to
the command line version of caput. Cheers, Nick Rees Principal Software Engineer Phone: +44 (0)1235-778430 Diamond Light Source Fax: +44 (0)1235-446713 From: [email protected] [mailto:[email protected]]
On Behalf Of ??? 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 follows(sample.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
-- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. |