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  2016  2017  2018  <20192020  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  <20192020 
<== Date ==> <== Thread ==>

Subject: Re: [EXTERNAL] CSS jython setvalue behaviour
From: Pilar Gil via Tech-talk <tech-talk@aps.anl.gov>
To: "Kasemir, Kay" <kasemirk@ornl.gov>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Thu, 12 Sep 2019 16:18:58 +0200
I have check with local variables works if I set manually the type of data. The think is that I would like to set a PV that I have defined in a DB.
The type of data that I have is 

    Access:           read, write
    Native data type: DBF_DOUBLE
    Request type:     DBR_DOUBLE

If I used caput for setting the PV there is no problem. But it is impossible to set this variable through a script. I get following exception:

Traceback (most recent call last):
  File "<script>", line 7, in <module>
at org.csstudio.vtype.pv.jca.JCA_PV.performWrite(JCA_PV.java:547)
at org.csstudio.vtype.pv.jca.JCA_PV.write(JCA_PV.java:412)
at org.csstudio.simplepv.vtypepv.VTypePV.setValue(VTypePV.java:256)
at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
java.lang.Exception: java.lang.Exception: Cannot handle type java.math.BigInteger

Is there another possibility for doing that in CSS?
Thank you Kay!
Pilar

El jue., 12 sept. 2019 a las 15:49, Kasemir, Kay (<kasemirk@ornl.gov>) escribió:
>  And if I want to use a PV defined in the database? What can I use?

When you connect to a Channel Access PV, you get the type that Channel Access reports.
You cannot change it.
For an analog input record, you get VDouble.
When you connect to the RVAL field, you get VInt.

The exact details of local PV handling differ depending on using
 * vtype.PV with Eclipse-based BOY
 * PVManager with Eclipse-based BOY
 * The latest CS-Studio, i.e. the Display Builder under Phoebus

In the latter, when I use  "loc://num(0)" it defaults to a VDouble.
A script can write 2147483649 (= 0x80000001) to that variable without loss.
I can also use loc://num<VLong>(0) to force a double type, again written without loss.
loc://num<VInt>(0) wasn't supported, just added that, and it truncates when you write something larger than 0x7fffffff (shows up as negative).

-Kay


--
http://sevensols.com
Pilar Gil Jaldo

Embedded SW Engineer

This e-mail and any materials attached hereto, including, without limitation, all content hereof and thereof are confidential and proprietary to Seven Solutions,S.L and/or its affiliates, and are *confidential*. Without the prior written consent of Seven Solutions, this content may not (i) be disclosed to any third party, (ii) be reproduced, modified or otherwise used by anyone other than current employees of Seven Solutions or its affiliates. If you are not the intended recipient or if this message has been received in error, please immediately notify us via e-mail and delete it.

 This e-mail and any materials attached hereto, including, without limitation, all content hereof and thereof are confidential and proprietary to Seven Solutions,S.L and/or its affiliates, and are *confidential*. Without the prior written consent of Seven Solutions, this content may not (i) be disclosed to any third party, (ii) be reproduced, modified or otherwise used by anyone other than current employees of Seven Solutions or its affiliates. If you are not the intended recipient or if this message has been received in error, please notify us immediately via e-mail and delete it.
Replies:
Re: [EXTERNAL] CSS jython setvalue behaviour Kasemir, Kay via Tech-talk
References:
CSS jython setvalue behaviour Pilar via Tech-talk
Re: [EXTERNAL] CSS jython setvalue behaviour Kasemir, Kay via Tech-talk
Re: [EXTERNAL] CSS jython setvalue behaviour Pilar Gil via Tech-talk
Re: [EXTERNAL] CSS jython setvalue behaviour Kasemir, Kay via Tech-talk
Re: [EXTERNAL] CSS jython setvalue behaviour Pilar Gil via Tech-talk
Re: [EXTERNAL] CSS jython setvalue behaviour Kasemir, Kay via Tech-talk
Re: [EXTERNAL] CSS jython setvalue behaviour Pilar via Tech-talk
Re: [EXTERNAL] CSS jython setvalue behaviour Kasemir, Kay via Tech-talk

Navigate by Date:
Prev: Re: [EXTERNAL] CSS jython setvalue behaviour Kasemir, Kay via Tech-talk
Next: Re: [EXTERNAL] CSS jython setvalue behaviour Kasemir, Kay 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  <20192020 
Navigate by Thread:
Prev: Re: [EXTERNAL] CSS jython setvalue behaviour Kasemir, Kay via Tech-talk
Next: Re: [EXTERNAL] CSS jython setvalue behaviour Kasemir, Kay 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  <20192020 
ANJ, 12 Sep 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·