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

Subject: printing value of pv to new line
From: palak shimpee <[email protected]>
To: [email protected]
Date: Mon, 26 Sep 2016 06:22:53 -0400
I want that my pv should be read and printed continuously. I have written below python code :

from org.csstudio.opibuilder.scriptUtil import PVUtil
import os,sys
import subprocess
import glob
from os import path
from datetime import datetime
while True:
pv=PVUtil.getDouble(pvs[1])
i = datetime.now()
sys.stdout=open("test2.txt","wb")
print str(i), pv '\\n'
sys.stdout.close()

But I an getting error:

2016-09-26 15:49:33 ERROR: Failed to register .
SyntaxError: ("mismatched input 'pv' expecting INDENT", ('<script>', 8, 0, 'pv=PVUtil.getDouble(pvs[1])\n'))

please help me to solve this

Replies:
Re: printing value of pv to new line Hugo Slepicka

Navigate by Date:
Prev: Re: Long string command to device Bo Jakobsen
Next: Re: Danfysik 8500 or 9100 power supply driver Priller, John
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Andor SDK3 issue - AT_WaitBuffer fails Pearson, Matthew R.
Next: Re: printing value of pv to new line Hugo Slepicka
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 19 Oct 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·