This work shows a computer application designed to control and optimize the
water supply in greenhouses from several possible sources. The software, p
repared in the LabVIEW(R) program environment, was built with a programming
method of events and states: each process to be developed by the program i
s divided into a finite set of states, called up by events from outside or
from the system. The program establishes the correct water volumes to be su
pplied to the greenhouses from the available sources, complying with the re
quirements of quality defined by the user and minimizing the total cost of
the mixture by the use of the Simplex algorithm. The configuration of the c
ontrol module and of each different source of water is accomplished by mean
s of a database with dBASE(R) format, using a SQL program interface.