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 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
<== Date ==> <== Thread ==>

Subject: Re: Linearly scale a PV
From: Ralph Lange <ralph.lange@gmx.de>
To: EPICS Tech Talk <tech-talk@aps.anl.gov>
Date: Tue, 18 Jul 2017 13:47:48 +0200
Mark is right.

For the example that Ahmad mentioned (converting W in kW), I assume there is a good chance that the result does not need to have more than three digits after the decimal point, so that using an integer conversion between device support and database would not not lose relevant data.
It all depends, as always. ;-)

Cheers,
~Ralph


On Tue, Jul 18, 2017 at 1:35 PM, Mark Rivers <rivers@cars.uchicago.edu> wrote:
This only works if the device support reads the value into RVAL and returns 0, rather than 2 (do not convert).  This means your value in watts would need to be an integer, because RVAL is a long.  So if your device support is reading a double directly into VAL and returning 2 then you cannot do the scaling in the ai record, you need to do it in an external calc record.


________________________________
From: tech-talk-bounces@aps.anl.gov [tech-talk-bounces@aps.anl.gov] on behalf of Ralph Lange [ralph.lange@gmx.de]
Sent: Tuesday, July 18, 2017 6:11 AM
To: EPICS Tech Talk
Subject: Re: Linearly scale a PV

Check
https://wiki-ext.aps.anl.gov/epics/index.php/RRM_3-14_Analog_Input#Read_and_Convert_Parameters


On Tue, Jul 18, 2017 at 12:47 PM, Abdalla Ahmad <abdalla.ahmad@sesame.org.jo<mailto:abdalla.ahmad@sesame.org.jo>> wrote:
Hi

Let's say we have a PV that reads a power in watts and needs to be displayed in kW. Is there fields that do this conversion without writing an external calc record for example?

Best Regards,

Abdalla Ahmad
Control Engineer
SESAME
Allan, Jordan.
Tel: (+962-5) 3511348 , ext. 265<tel:+962%205%20351%201348>
Fax: (+962-5) 3511423<tel:+962%205%20351%201423>
Mob: (+962-7)88183296<tel:+962%207%208818%203296>
www.sesame.org.jo<http://www.sesame.org.jo/>




References:
Linearly scale a PV Abdalla Ahmad
Re: Linearly scale a PV Ralph Lange
RE: Linearly scale a PV Mark Rivers

Navigate by Date:
Prev: RE: Linearly scale a PV Mark Rivers
Next: mrfioc2 repositories Gofron, Kazimierz
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
Navigate by Thread:
Prev: RE: Linearly scale a PV Mark Rivers
Next: mrfioc2 repositories Gofron, Kazimierz
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
ANJ, 18 Jul 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·