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  <20122013  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  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: EPICSPVFactory in CSS JavaScript
From: Hovanes Egiyan <[email protected]>
To: "[email protected]" <[email protected]>
Cc: Beni Zihlmann <[email protected]>
Date: Thu, 13 Dec 2012 10:15:07 -0500
Hi,

we are trying to connect to EPICS variables from a CSS JavaScript script.
By looking at the CSS source and some examples we figured that we would need to use "EPICSPVFactory" class to create an object to connect to our EPICS variables.
This class is apparently defined in "org.csstudio.utility.pv.epics", so we
try the following short script:

importPackage(Packages.org.csstudio.opibuilder.scriptUtil);

importPackage(Packages.java.lang);

importPackage(Packages.org.csstudio.utility.pv);

importPackage(Packages.org.csstudio.utility.pv.epics);

//-----------------------------------

runnable = {

    run:function()

        {

            var  pv = EPICSPVFactory.createPV( "epics://value1" );

        }

    };

new Thread(new Runnable(runnable)).start();

//-----------------------------------------------

But when we run it, there is an error message:

Exception in thread "Thread-152" org.mozilla.javascript.EcmaError: ReferenceError: "EPICSPVFactory" is not defined. (script#11)


When we change "EPICSPVFactory.createPV" to "PVFactory.createPV", the error disappears. This is as if the "importPackage(Packages.org.csstudio.utility.pv.epics" statement has no effect. We are using SNS Basic EPICS CSS 3.1.2 product that we downloaded from the SNS web site. Is there something else or something different we need to do to be able to use the
"EPICSPVFactory" and "EPICS_V3_PV" classes in our scripts?

Thanks in advance,
     Hovanes.


Replies:
RE: EPICSPVFactory in CSS JavaScript Chen, Xihui

Navigate by Date:
Prev: Re: "Connection refused" when running Ethernet/RS232 application Nicholas P. DiMonte
Next: RE: Re:RE: "Connection refused" when running Ethernet/RS232 application Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: calc R3-1 Tim Mooney
Next: RE: EPICSPVFactory in CSS JavaScript Chen, Xihui
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·