EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Scaling Database entries
From: Dirk Zimoch <[email protected]>
To: David Dudley <[email protected]>
Cc: [email protected]
Date: Wed, 15 Nov 2006 17:07:34 +0100
David,

if you driver does not set ESLO and EOFF, you can set it in your db. Calculate manually what to set. I did the same with StreamDevice.

EOFF = VAL that corresponds to RVAL=0x0000
ESLO = VAL range / RVAL range

Example:
RVAL range 0x0000 ... 0xFFFF, VAL range  -10 ... +10:
EOFF=-10, ESLO=0.000305180437934   ( 20 / 0xFFFF)
	
RVAL range 0x0000 .... 0x3FFF, VAL range 0 ... 10:
EOFF=0, ESLO=0.0006103888177 (10 / 0x3FFF )

Don't forget to set LINR to "LINEAR", of course.

Dirk

David Dudley wrote:
Two point scaling I understand. What I haven't figured yet is where I put it in.

Where(how) do I set the deviceHigh and deviceLow variables, or is that expected in the device driver? And if it is in the device driver, does that mean that I'm going to have to have a separate device entry for each device that has a different dynamic range?

Dynamic range calculations are not handled inside EPICS?

I've got a number of different dynamic ranges for the different devices here, do they all have to be separately scaled inside the device driver to a standard range, or can EPICS be set to adjust for the dynamic ranges?

Most of the software (make that *all*) I've used previously had the ability to have the RAWLOW and RAWHIGH values set, and they they did the scaling themselves. Seems an omission if EPICS can't do that?

David


"Mark Rivers" <[email protected]> 11/13/06 8:22 PM >>>

Device support must have a "convert" routine that does a calculation like the following to compute .ESLO and .EOFF
precord->eslo = (eguf - egul)/(deviceHigh - deviceLow);
precord->eoff = (deviceHigh*egul - deviceLow*eguf)/
(deviceHigh - deviceLow);
Mark


________________________________

From: David Dudley [mailto:[email protected]] Sent: Mon 11/13/2006 8:07 PM
To: [email protected] Subject: Scaling Database entries




OK guys,

My modbus driver is starting to work, and now I'm linking up with some of the PLC's in the plant. Now, I've started working on building the database for the first site.

Here's my question:

I've got some AI signals that come from one of the PLCs. Raw values on some are scaled 0-32000, while others are scaled 800-32000, and others have raw values from -32768-32767. I see the definitions for the EGUL and EGUF values, but how do I set the RAW input ranges? Also, I've got some flow meter values that have to be scaled from linear to square root values..

David Dudley
City of Corpus Christi








------------------------------------------------------------------------


BEGIN:VCARD
VERSION:2.1
X-GWTYPE:USER
FN:David Dudley
TEL;WORK:880-3740
ORG:;MIS
TEL;PREF;FAX:880-3741
EMAIL;WORK;PREF;NGW:[email protected]
N:Dudley;David
END:VCARD


-- Dr. Dirk Zimoch Swiss Light Source Computing and Controls Paul Scherrer Institut phone +41 56 310 5182 fax +41 56 310 4413

Replies:
Re: Scaling Database entries Andrew Johnson
References:
RE: Scaling Database entries David Dudley

Navigate by Date:
Prev: Re: Irmis applicative points Andrew Johnson
Next: Re: Scaling Database entries Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Scaling Database entries Kay-Uwe Kasemir
Next: Re: Scaling Database entries Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·