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: CSS - how to read waveform of CHARS (or STRINGS) in a script?
From: Hugo Slepicka <[email protected]>
To: Isabella Rey <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 13 Mar 2015 16:47:27 -0300
Hi Isabella,

I think that this will work for you:

from org.csstudio.opibuilder.scriptUtil import PVUtil
from org.csstudio.opibuilder.scriptUtil import ConsoleUtil

v = PVUtil.getString(pvs[0]).split(",")
myStr = "".join(chr(int(i)) for i in v)
ConsoleUtil.writeInfo(myStr)

HTH,
Hugo

On Fri, Mar 13, 2015 at 4:01 PM, Isabella Rey <[email protected]> wrote:
Hi All,

In CSS (Windows), I am trying to read a waveform of CHARS inside a Python script.
When I do PVUtil.getString, I get displayed a sequence of numbers instead of characters.

Is there any way to get the text in the script??

If I create a text update widget pointing at the waveform, I get the text correctly, I want to get the same in the script.

If it helps:
for what I need to do, I can also have a waveform of strings, rather than chars, and I need to extract the strings in the Python script.
Whichever works would be fine!

Cheers,
Isabella




--
Hugo Slepicka
+55 19 9 9902 9322


References:
CSS - how to read waveform of CHARS (or STRINGS) in a script? Isabella Rey

Navigate by Date:
Prev: Re: CSS - how to read waveform of CHARS (or STRINGS) in a script? John Hammonds
Next: logarithmic 2-D image data Pearson, Matthew R.
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: CSS - how to read waveform of CHARS (or STRINGS) in a script? John Hammonds
Next: logarithmic 2-D image data Pearson, Matthew R.
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 ·