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.