EPICS Home

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  <20172018  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  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Linearly scale a PV
From: Ralph Lange <[email protected]>
To: EPICS Tech Talk <[email protected]>
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 <[email protected]> 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: [email protected] [[email protected]] on behalf of Ralph Lange [[email protected]]
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 <[email protected]<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  <20172018  2019  2020  2021  2022  2023  2024 
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  <20172018  2019  2020  2021  2022  2023  2024