12-17-2021 11:31 AM
Hello everyone,
I'm currently trying to put together my labview project for school and I could really do with some help I'm struggling how to do a few small things that maybe some more experienced people might be able to help me with. I'm trying to make a basic temp control system but I'm having trouble trying to get it to do certain things in the criteria.
1. I have to try and get the max and min of the humidity and temp values and don't know if I can even do it with my current build?
2. Should I do an array for the average, max, min, and history for the unit and if so how do I wire it up as I couldn't do it when I tried to add the arrays?
3. Is my current build for controlling the temp ok or is there a better way to control the system as i just need to create a random input for temp and humidity?
If there is any more info you need to help me feel free to ask, trying to learn how this works so please be kind I'm very new to this and my lecture wont respond to emails😞
.
12-17-2021 12:28 PM
Note: This does a total min/max for all samples.
See the highlighted bit of code in the attachment.
12-17-2021 01:40 PM
You can use either a shift register or a feedback node along with the Build Array primitive to create your history array.
For the max/min stuff, there are some VI's that accept single points at a time and give you some info. For example, the Mean Pt by Pt:
I'd recommend a shift register to build your history. I prefer them to feedback nodes, but they both work fine. Right click the border of your While loop and select "Add shift register".
Sorry your prof isn't returning emails 😞
12-17-2021 01:51 PM - edited 12-17-2021 01:55 PM
In addition to what has been said:
12-17-2021 02:40 PM - edited 12-17-2021 02:42 PM
Also, if attaching code, make sure that all controls contain typical default values so we don't have to guess what they should be.
I also would recommend to implement some sanity check e.g. to ensure that setpoint high>setpoint low to avoid surprises. (not shown)
Never call a VI "Untitled 1.vi"! That's just plain lazy! So many others do that too and my browser turned it into "Untitled 1 (12).vi", with the danger that I look at the wrong VI.
To get you started, here's a quick draft how you could handle the temperature and heater (adding humidity would be trivial, but try to avoid all your duplicate code!)
12-17-2021 03:34 PM
Sorry about the untitled VI still very new to this and also thanks for the help I greatly appreciate it. Going to get stuck into all the info you guys gave me and see how I get on. Thanks again!!🙂