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  <20082009  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  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: RE: Is it possible to implement a loop in db?
From: "Silver" <[email protected]>
To: "Dalesio, Leo" <[email protected]>, "???" <[email protected]>, "[email protected]" <[email protected]>
Date: Fri, 26 Dec 2008 23:34:01 +0800
hi, Bob:

  may I use a compress record like this?
record(compress, "$(user):compress1")
{
        field(DESC, "average algorithm ")
        field(INP,  "$(user):aiExample.VAL CP NMS")
#       field(INP,  "uc7420:wfDataOut CP NMS")
        field(SCAN, "Passive")
        field(ALG,  "N to 1 Average")
        field(N,    "10")
        field(NSAM, "1")
}
aiExample is from exampel.db coming with example tempelate. here compress will caculate the average value of ai after getting 10 values.
while a question, when I use dbpr compress1 in ioc shell, it shows val is a nil. the average value will be put in it, it must be an array, why the address is nil?

Best wishes
Silver 2008/12/26

======= At 2008-12-26, 22:49:28 you wrote: =======

>Put a number in the SMOO field - like .95
>This will take .95 of the current reading
>and .05 of the previous reading (which is the result of this running average.)
>If the signal is more noisy - make the SMOO field something smaller - closer to 0.
>For something like a strain gauge - I've had this number be as low as .05 - but a step change would take 20 readings to change.
>Bob
>
>
>-----Original Message-----
>From: [email protected] on behalf of ???
>Sent: Thu 12/25/2008 10:43 PM
>To: [email protected]
>Subject: Is it possible to implement a loop in db?
> 
>Merry X'mas and happy new year to every one!
>
>i have a record like this:
>
>record(ai, "17U:ES:ADC-01")
>{
>  field(SCAN, ".1 second")
>  field(LINR, "LINEAR")
>  field(EGUF, "10")
>  field(EGUL, "-10")
>  field(DESC, "ADC Site B Ch 1")
>  field(PREC, "6")
>  field(EGU, "Volts")
>  field(HOPR, "10")
>  field(LOPR, "-10")
>  field(DTYP, "Hy8401ip")
>  field(INP, "#C30 S0 @")
>}
>
>
>The hardware is hytec 8002 and hytec 8401 in VME crate which is used to collect the voltage from an ion chamber after an amplifier. When read the value directly there will have noise. I want to collect ten values and avrage them to putout. Is it possible to implement by a calc record? 
>
>Another thing i am confusing is the time. Epics support 0.1,0.2,0.5 and 1,2,5 seconds scan. The 8401 clock rate can be set at 100khz in max. If i need more higher frequency then 10Hz to obtain the record value, how can i do?
>
>Thank you very much.
>
>???
>===================================================
>No.239 Zhangheng Road
>PuDong District
>Shanghai Institute of Applied Physics CAS
>Shanghai, China
>Tel: +86-21-33933256  Fax: +86-21-33933031
>
>
>

= = = = = = = = = = = = = = = = = = = =
			

Best regards				 
Geyang 2008-12-26




References:
Is it possible to implement a loop in db? ???
RE: Is it possible to implement a loop in db? Dalesio, Leo

Navigate by Date:
Prev: RE: Is it possible to implement a loop in db? Dalesio, Leo
Next: edm help Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Is it possible to implement a loop in db? Dalesio, Leo
Next: edm help Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  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 ·