average temp with a 3 hr span

ssrmr2

Member
Join Date
Mar 2006
Location
Santa Fe Springs, Ca
Posts
9
Hi everyone, quick question. I need to know what the "ave" command looks like with in the SLC 500. is it similar to the plc-5 "ave" command. what i mean is the same parameters. who evr has info please let me know

I am trying to average the temps: 3 hr span. using data from 60 sec cycles, storing them into an N file and then writing the avg to a pen chart.

thanks

steve
 
thanks for the file. I will have to wait until the plc comp is free so i can view it. Is there a way that i can view it, like pdf or something of that nature??

thanks
 
In general, you need a "Flying Window"...

3 Hours of 60-sec cycles = 180 readings.

You need a shift-register consisting of 180 elements.

Everytime a cycle occurs, add up(*) all of the 180 elements(**), then divide by 180. That is the average for the last 3 hours.

(*)This can be done more easily, when a cycle occurs, by subtracting the value that is being ejected from the shift-register from the total, and then adding the new reading to the total, and then dividing by 180. Then shift-in the new reading into the shift-register. At PLC Power-Up reset the total to zero.

(**)Keep count of the cycles that have occurred after power-up. If less than 180 cycles have occurred, then add up the valid entries and divide by that number of entries.

You should also consider controlling register content during down-time.
 
Thanks for all the info. I am using this as a average temp reading and then taking the output (average) to write to a pen device to plot the average temps over a 24 hr period.

I will be writing the logic this week sometime. will let everyone know if it works or not.

steve
 

Similar Topics

Does this instruction calculate values during a single scan, or does it require number of scans based on element count in the array? For Example...
Replies
3
Views
114
I am working on a program in Cscape to take a pulse input from a flow meter and output an average of the last 5 minutes of flow and total flow to...
Replies
1
Views
574
I am storing values into an array. I am wanting to find an average of the highs and an average of the lows. Something like this... After 50...
Replies
36
Views
8,857
I need to keep a running pass/fail yield of the previous 5,000 parts produced. I have used this formula before to calculate average: AvgValue =...
Replies
6
Views
2,156
is it possible to capture a value while its constantly changing then taking its highest reading? I have a nozzle that sprays for 10 seconds. I...
Replies
14
Views
3,437
Back
Top Bottom