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: | 答复: How to define a global variable and global array in python script for a widget of Control system studio (CSS) ? |
From: | lzf neu <[email protected]> |
To: | Anton Derbenev <[email protected]>, "[email protected]" <[email protected]> |
Date: | Mon, 30 Oct 2017 07:59:11 +0000 |
Hi Anton,
Thanks for your relpy. It is a good idea and I have one more question to consult you.
Now, I have two PVs, one is my local PV (loc://record), another is external PV from epics (caLab:okok). The result of "camonitor caLab:okok" display 1,2,3,4,5,... each second.
and I want to put the value of caLab:okok to my local PV (loc://record) as an input for my script to store the value.
In my script, #0 is caLab:okok and #1 is loc://record, I try to write the script as the following lines:
from org.csstudio.opibuilder.
data=""> PVUtil.getDouble(pvs[1])=data However, the error occurs: SyntaxError:("can't assign to function call", ('<script>',3,0, 'PVUtil.getDouble(pvs[0])=value\n')) Any help will be appreciated and thanks in advance.
发件人: Anton Derbenev <[email protected]>
发送时间: 2017年10月30日 2:17 收件人: lzf neu 抄送: [email protected] 主题: Re: How to define a global variable and global array in python script for a widget of Control system studio (CSS) ? Hello Zhefu,
how about using a local PV to store the value? This would also give you the possibility to show it on your page, if needed. You can put local PV as an input for your script, e.g.:
loc://$(DID)_my_x(0)
implying that this possibility didn't change since I last checked...
Anton.
On Sun, Oct 29, 2017 at 10:33 AM, lzf neu
<[email protected]> wrote:
|