Re: [foxboro] 12 hour ave
- From: "Brian Long" <blong@xxxxxxx>
- To: <foxboro@xxxxxxxxxxxxx>
- Date: Wed, 25 Feb 2004 23:15:17 -0600
I was hoping there was an easy way. I think Foxboro needs a new block.
Thanks for all the help.
Brian
-----Original Message-----
From: foxboro-bounce@xxxxxxxxxxxxx
[mailto:foxboro-bounce@xxxxxxxxxxxxx]On Behalf Of Jim Mowrey
Sent: Wednesday, February 25, 2004 8:58 PM
To: foxboro@xxxxxxxxxxxxx
Subject: Re: [foxboro] 12 hour ave
So far, all the solutions I've read use a tremendous amount of memory and/or
blocks in order to store 12hours x 3600 sec/hr values and update them.
How about this? (Just off the top of my head, so may need work.) If you
loosen the accuracy somewhat, create 13 ACCUM blocks, each tied to the
measurement AIN. Create a few CALCA blocks using the time of day command to
monitor the current time. (Or a IND block, if you prefer). The non-current
ACCUM blocks HOLD bits would be set by the CALCA blocks based on time of
day. So, only one ACCUM block would be actively accumulating. You'd know
how long it had been running based on the time command in the CALCA blocks.
Say that ACCUM block 10 of 1 to 13 was currently not in HOLD, and it was 20
minutes after the hour. Add the OUT's from ACCUM block 1-10, 12 and 13 and
(3600-1200)/3600 * ACCUM block 11's OUT value. This gives you a fairly
accurate sum of the accumulated value for the last 12 hours. The only
inaccuracy is in the estimation that the first hour's accumulation was at a
steady rate for the fraction of an hour that you use in the sum. In this
case, we've added 2/3 of the accumulated value in block 11 and all of the
other blocks including block 10. Note block 10 has been running for only 20
minutes or 1/3 hour, or 1200 seconds.
Now, divide the sum by 3600*12 to give the "average" rate over the last 12
hours; this is done in the CALCA blocks as well. At the hour, place ACCUM
block 10 in HOLD, freezing its value, and clear the value stored in ACCUM
block 11, and remove it from HOLD. Now, block 11 is the only accumulating
(not in HOLD) ACCUM block, and a fraction of block 12 is added in depending
on how many seconds it is past the hour.
A back of the envelope calculation shows this should be accurate to +/- 4%
assuming that at 30 minutes past the hour 12 hours ago the measurement went
from zero to its current value. And, it only uses 13 ACCUM blocks and 2 or
so CALCA blocks, for about 19 block equivalents.
Jim Mowrey
Maxis Automation
-----Original Message-----
From: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-bounce@xxxxxxxxxxxxx] On
Behalf Of Brian Long
Sent: Wednesday, February 25, 2004 6:54 PM
To: Foxboro
Subject: [foxboro] 12 hour ave
I need to take an analog input running at 1 sec and average it over 12
hours. I need to display the value so I can't use the historian functions.
Anybody got a simple solution?
Thanks,
Brian Long
E&I Superintendent
Green Bay Packaging
Arkansas Kraft Division
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
foxboro mailing list: http://www.freelists.org/list/foxboro
to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
foxboro mailing list: http://www.freelists.org/list/foxboro
to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
foxboro mailing list: http://www.freelists.org/list/foxboro
to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
- Follow-Ups:
- Re: [foxboro] 12 hour ave
- From: Bakke, Richard A
- Re: [foxboro] 12 hour ave
- From: Jorge Monsalvo
- References:
- Re: [foxboro] 12 hour ave
- From: Jim Mowrey
Other related posts:
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- » Re: [foxboro] 12 hour ave
- Re: [foxboro] 12 hour ave
- From: Bakke, Richard A
- Re: [foxboro] 12 hour ave
- From: Jorge Monsalvo
- Re: [foxboro] 12 hour ave
- From: Jim Mowrey