I need to design an application to control the temperature of a classroom, using a CL air conditioning device and SA temperature logger, connected to a L1 computer.
The expressed need for the application is:
1. Start and/or stop the air conditioning CL 2. Display the temperature captured by SA 3. Display the instruction given to CL 4. Regulate the temperature so that it is between 2 thresholds TEMPMIN and TEMPMAX
The method ON(nom_clim, inst, ordre) allows, by reading, to obtain the information on the current state of the air conditioning device:
- Inst = 0: device stopped - inst = 1: device running
- order = 0: cooling - order =1: heating
Two methods are available for controlling the system, knowing that the air conditioning is initially stopped in the classroom.
1. The method ON(nom_clim, inst, ordre) controls the air conditioning device CL :
- The first parameter nom_clim gives the name of the air conditioning.
- The second one, the inst instruction on 1 numeric character. The control box allows the air conditioning to be started or stopped. When the instruction is given, ON() compares it with that of the box and performs the update.
✓ inst = 0 : stop air conditioning
✓ inst = 1 : turn on the air conditioning
- The third, the instruction order on 1 numeric character allows to activate the reversibility of the air conditioning device
✓ order = 0 : cooling
✓ order = 1: reheat
2. The method T=read(SA) retrieves the temperature read in the class by the operator. SA is read every five minutes and stored in the variable T
I would like to have your opinion on my flowchart if I meet the requirements of my application.
As it happens, I'm doing something quite similar for a client. One thing that I have for Real World use is "hysteresis". Hysteresis is a sort of built-in lag. For example, I might turn cooling on at 27 degrees, but keep it on until temperature drops below 25 degrees. The reason for this is that without hysteresis, a temperature of exactly 27 might cause the cooling control relays to "chatter" - turning on and off as the temperature wobbles back and forth. That's bad for the relays as well as the motors. Plus anyone listening to it happen would think the entire unit had gone haywire. Not a problem for theoretical design, but definitely something you don't want when you're dealing with actual hardware.
Your flowchart looks basically OK, except that you have a decision with 2 outputs and no input.
Sources may include data from the Fakebook Research Foundation with support from Gargle University
interesting question... is that a homework?
Just to be sure I understand the requirements, the goal for the system is to keep the room temperature between TempMin and TempMax, or as close as possible to SA?
From the description I thought it was the former, but from your flowchart I have a doubt that it seems the latter.
Also, as Tim said, there are a few issues that you could fix around the "T<SA" decision block. And I'd definitely second Tim's suggestion to introduce a tolerance area to avoid the system flipping on and off (depending on the answer to my first questions, you could do it in different ways, of course).