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  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: Reset integral pv and store it
From: Ralph Lange <[email protected]>
To: [email protected]
Date: Fri, 31 Mar 2017 20:21:37 +0200
On March 31, 2017 4:47:43 PM GMT+02:00, Miguel <[email protected]> wrote:
Hi all,

I have a PV that is an integral over the day. I would like at the end of the day(certain timestamp) to store it to the DB (maybe in another PV) and after that reset the integral.

I would also like that if epics restarts the intergal will initiate with the most recent value in the DB.

My DB is with mysql with the CSS archive engine.

my current integral PV:

record(calc, "$(user):DLI"){
    field(DESC, " Daily light Integral (mol.m-2.day-1)")

    field(INPA, "$(user):Lum1")
    field(INPB, "$(user):DLI")
    field(CALC, "A*1e-6+B")

    field(SCAN, "1 second")
    field(EGU, "DLI")
    #field(PREC, "6")
    #field(ADEL, "10")

    field(LOPR, "0")
    field(HOPR, "1000")    #High Operating Range
}

Thanks a lot,
MiguelB

Yet another idea:
The stringin record has support for strftime formats. If you use that to create a six digit hhmmss number, you can use a calcout record to e.g. check for <10 and process a seq record on the 1->0 edge to do the integral reset sequence.

Cheers,
~Ralph

Replies:
Re: Reset integral pv and store it Kasemir, Kay
Re: Reset integral pv and store it Maren Purves
References:
Reset integral pv and store it Miguel

Navigate by Date:
Prev: Re: Reset integral pv and store it Kasemir, Kay
Next: Re: Reset integral pv and store it Kasemir, Kay
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: Reset integral pv and store it Kasemir, Kay
Next: Re: Reset integral pv and store it Kasemir, Kay
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 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·