Measuring average daily temperature?

peterparch

Guest
P
I am complete novice to the world of PLC programming but am trying to learn.
I have an application that requires using the previous day's average temperature to control the duration that a water valve is opened for operating an irrigation system.
I have downloaded and experimented with the demonstration software from Mitsubishi for their Alpha series PLCs and also browsed through the software and programming manuals. Although the instantaneous temperature can be measured with an analog input port I cannot figure out how, or if, repeated measurements made at different times can be processed to come up with a daily average, maximum or minimum.

Is it possible to do this with the Alpha PLCs ,or any other PLC for that matter?
 
peterparch said:
...Is it possible to do this with the Alpha PLCs ,or any other PLC for that matter?

Like any average, you need to first decide of the samples.

1 reading per hour?
1 reading per minute?
1 reading per second?
1 reading per scan?

Then you ADD the readings and DIVIDE by the sample.

Simple enough?
 
And to add to that, its nice if the PLC features a real time clock so that you don't have to rely on counting second timers and the accumulated error that may occur. Then, if you want to take a temperature measurement every hour, it becomes real easy.
 
One of the neat things when you register is we get an idea of where you are. SO I will assume you are in the USA.

You can get average temperature from you local newspaper or the National Weather Service. It may be reported in terms of degree days ie (temp minus 65F).

Also with respect to irrigation
in addition to average temp, would you not also be interested in some measure of clear sky (ie more sun requires more water ??).
What about relative humidity?? Irrigation inversely proportional to RH ??
Last wind speed - more airflow more drying factor ??
LAST but not least what about rainfall -- why irrigate in the rain or if it has rained recently -- assuming adequate amount of water??

I know the Forest Service uses the above factors to esimtate fire danger in forests.

Dan Bentler
 
Thank you for the replies. I know that calculating an average is simply a matter of sampling, totalizing then dividing by the number of samples. However I am not sure about how to do this (i.e. the totalizing part) with the Alpha PLC. The instruction set includes an add function but I think that it merely adds 2 simultaneous inputs rather than adding an input from the present scan to a retained total from previous scans. Is this correct or is there some way of totalizing inputs?
 
peterparch said:
...However I am not sure about how to do this (i.e. the totalizing part) with the Alpha PLC...

Lets see.

You must decide HOW or WHEN you will do the adding and averaging.

With the RTC you can decide to ADD 2 Data values once at every 59th minutes of the hour.

You ADD Data-A AND Data-B into Data-B.
Your problem is to find how to do this. You could MOVE a Data value somewhere only to use this new location for the adding funtion.

Then, every 00:01 hour/minute you do your averaging and Store it somewhere else.

You could also have a more dynamic view of the average.

Every time you ADD actual values you do the averaging. It would give you the "Today's" ongoing average. You would move this value elsewhere for it to become Yesterday's average.

Many ways to skin a Cat.

As for the Alpha serie. Find a way to do this with its serie of functions.
 
The Alpha is more of a smart relay then a plc. I looked at the manual and I did not see an instruction for ADD, Divide or Move. It did have a time clock, compare instructions and PID type cabability. Here is the manual, maybe I overlooked something.
http://www.mitsubishi-automation.de/produkt/handbuch/pdf_download/126016.pdf

It looks to me like you could use this to turn on/off the water at designated times or by measuring moisture but I dont see the ability to do math and calculate averages. There is an Alpha XL that states math capabilities but so far havent been able to determine the difference or what they are refering too.

This page offers example programs for the Alpha: http://www.the-new-alpha.com/AL_Examples/examples.html
 
Last edited:
Thanks Ron & Dave,

The Alpha does have an ADD function block but I think that it only adds 2 simultaneous inputs and is therefore not of much use for calculating averages.

Can you suggest a simple inexpensive PLC that will enable me to do this?

Peter
 
peterparch said:
Pierre,

That is exactly my question. How, or can you, do this with the instruction set of the Alpha PLC?

peterparch said:
...Is it possible to do this with the Alpha PLCs ,or any other PLC for that matter?

peterparch said:
Can you suggest a simple inexpensive PLC that will enable me to do this?

In the Mitsubishi line you will not find anything in the range of the Alph stuff that can do it.

You need math + memorie + analog input ... I guess that rules out the inexpensive part ... In the Mitsu line you could go for a mix of Fx1n and FxO analog ... check your dealer for the most inbexpensive match.

Get a digital (read ON/OFF :D) humidity sensor. Cheap, efficient and thats how the pros do it.
 
Depends on what you mean by inexpensive, an Allen Bradley Micrologix 1000 can be obtained for around $100 US with a free software download. http://www.ab.com/micrologix.

This allows ADD, SUB, MUL and DIV..I think. The ADD doesnt do but 2 at a time but there are ways to work around that. Off top of my head one way is to use "time" to trigger when a measurement is taken...move this value to an integer word file then add it to another integer word file that is also the destination file...ie
ADD integer word 1 to integer word 2 and put result in integer word 2.

You have several options on when to average...lets say you take a measurement every 2 hours, so to get an average you will divide by 12. You do a count to determine the number of measurements taken when it reaches 12 you then divide word 2 by 12 and put the result in word 3...to use as needed. You then clear word 2 or move zero (0) into it and repeat the process.

Others may offer a better explanation or idea using AB.
 
Read in todays Seattle Times about an irrigation controller
http://seattletimes.nwsource.com/html/homerealestate/2002243926_savingwater17.html

Weather-based automatic irrigation controllers

These automatically adjust your sprinkler schedule based on local weather. Called evapotranspiration, or ET, systems, they either use preprogrammed historic weather data or real-time, satellite-fed data to make adjustments based on the microclimate in your neighborhood. One manufacturer is HydroPoint (www.hydropoint.com).

Price: $300 and up; some require a monthly fee of $4 to $20 to download the data.

Experts say: Koeller says it has cut his water bill in half. The system is able to adjust watering based on wind, humidity, soil type, precipitation and more, downloading data daily from a satellite. One study found savings of as much as 41 gallons a day for each household.

Jolayne Houtz: 206-464-3122 or [email protected]

Now you know at least as much as I do and probably more

Dan Bentler
 
If you are measuring temperature you need a PLC with an analog input. I would recommend the AutmationDirect.com DL-06. The DL-06 has a real time clock, all the math functions you need, and a variety of analog input cards available. The DL-05 is similar but doewn't have a real time clock.
 
Not that I have done it but I think you still can solve it in the Alpha(with AI) using the "TIME PROG", "ARCHIEVE", "ADD/SUB", "DISPLAY" and "MUL/DIV" functions.
 

Similar Topics

Hi everyone, I don't know much of PLCs but it happened that i need to connect Leuze AMS358i Ethernet laser measurement to Productivity 1000...
Replies
0
Views
1,072
Hello everyone! Firstly I'd like to say that I'm new to this forum and also new to PLC programming world altogether, that said I really would...
Replies
27
Views
4,885
I am looking for a way to determine level in a silo. The material is called Perilite which has a very light density. Bulk density could be...
Replies
10
Views
2,762
In our water cooling tank, I've installed and successfully wired up 4 float switches & updated the PLC (big thanks to @parky for that). As a...
Replies
46
Views
11,540
Hello, I have an application where I need to measure the salt level/volume in a salt saturator. This is a fairly large tank where we load bulk...
Replies
21
Views
6,529
Back
Top Bottom