07-04-2009 07:04 PM
I have built a waterbath for a system I am designing, and I am wondering how can I get LabVIEW to control the temperature? I need the water bath to get to 58 Deg C, and I can do so manually controlling the power. However, I am not sure how to get LabVIEW to do it in a stable manner. I do not want the pump that controls the water to click on and off rapidly. I would like for it to turn on when the temperature falls below 56 DEG C and turn off at a little bit above the target temperature of 58 DEG C. All of my system is completed and all that is left is the controlling the temperature. The program setup is in a producer/consumer setup. The first loop acquires data and cycles 13 valves. The second loop writes the measurements from a CO2 analyzer and a flow meter, and the third loop is to write the temperature, at a much lower frequency than the analyzer or flow meter. How is the best way about doing this? Note: An external temperature controller is not an option, and I do not have the LabVIEW PID tools.
07-05-2009 01:34 AM
Hi NT_Engine,
you already have code to do what you want.
- You compare the actual value with a setpoint using hysteresis and generate "upper limi" and "lower limit" booleans. Just use them to switch on/off the pump...
- You already decimate the values to get a lower frequency of data.
What else do you need?
Some comments:
- Instead of decimating you could simply drop every second value.
- Cleanup the code. It's too big. (Or do you use some 30' screen?)
- Some things are overly complicated:
+ To show the value of a thermometer scale you can show a digital display. No need for a second indicator.
+ You calculate an average using the waveforms. Right next to it you calculate the same average using dynamic datatype. Calculating once should be ok (and I wouldn't use dynamic datatypes...).
+ You convert an 1D array to dynamic data to waveform just to use the timestamp (which is set to "now"). Why not use "Format Date/Time string" without all this stuff before?
+ You build a path (with a constant "Temperature"). Then you strip the last part again to show it in a string indicator. Don't you think this is easier to achieve? Why do you need to do this in each iteration? Once before the loop should be ok too.
These are just some of the "unusual" items I see. And just for the temperature loop. All the rest is out of view for my laptop screen
07-05-2009 02:00 AM - edited 07-05-2009 02:03 AM
I fully agree with GerdW who was a bit faster than me ![]()
But I cleaned up a bit your code and took some screenshots.
I think you didn't knew about the array to cluster and cluster to array functions 🙂
File SNAG-003 shows two bundle's with the same inputs?
Regards
07-05-2009 02:43 AM
10-19-2011 03:22 AM
only instituion that have purchased original labview software can provide you original.
ur controller can only work in original labview
one source i am giving you
nitttr, chandigarh, sec -26, union teritory ,
india
i have demo trial version
plz give me your mathematical model of water bath,and its theory so that i can study it more accurately my email ashish19802005@gmail.com