Experimental Physics and Industrial Control System
Hello,
I'm working on the GUI in CSS Phoebus where I have a macro that
specifies the IOC name (IOCname='llrf10'). All panels open from the main
one and the macro is inherited.
Instead of having the macro defined as a property of the main panel, I'd
like to have a text-entry field in the main panel where I'd set up the
IOC name.
I have an action button with a script (embeddedJs) which shall do the
job. However, the script gets stuck in the PVUtil getString call.
This is an excerpt of a simple script (just to check how to read a PV):
*************
var mypv = PVUtil.getString("llrf10:llrf:version");
logger.info(mypv);
*************
The error message:
*************
2020-09-02 11:02:46 WARNING [org.csstudio.display.builder.runtime]
Execution of 'JavaScript EmbeddedJs' failed
org.mozilla.javascript.EvaluatorException: Can't find method
org.csstudio.display.builder.runtime.script.PVUtil.getString(string).
(EmbeddedJs#14)
at
org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:79)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1011)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1064)
at org.mozilla.javascript.Context.reportRuntimeError1(Context.java:1027)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:145)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:45)
at org.mozilla.javascript.gen.EmbeddedJs_4._c_script_0(EmbeddedJs:14)
at org.mozilla.javascript.gen.EmbeddedJs_4.call(EmbeddedJs)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:412)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3545)
at org.mozilla.javascript.gen.EmbeddedJs_4.call(EmbeddedJs)
at org.mozilla.javascript.gen.EmbeddedJs_4.exec(EmbeddedJs)
at
org.csstudio.display.builder.runtime.script.internal.JavaScriptSupport.lambda$submit$0(JavaScriptSupport.java:84)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
*************
Could you advise the correct use of the PVUtil.getString function?
Finally, my text-entry field will have a 'loc://myname' PV which I
intend to read in the script and assign it to the "IOCname" macro.
Thanks,
Peter
- Replies:
- Re: change MACRO with text-entry value in CSS Phoebus Kacper Kłys via Tech-talk
- Navigate by Date:
- Prev:
Re: Case insensitive macros in streamDevice protocol file O'Hea, James (DLSLtd, RAL, LSCI) via Tech-talk
- Next:
Integration of Elog into Phoebus Florian Feldbauer via Tech-talk
- 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
- Navigate by Thread:
- Prev:
Re: CAEN R1470ET HVPS - Asyn + Stream Device auto connect does not recover communication Jeong Han Lee via Tech-talk
- Next:
Re: change MACRO with text-entry value in CSS Phoebus Kacper Kłys via Tech-talk
- 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