02-26-2011 07:33 AM - edited 02-26-2011 07:35 AM
Hello all
I am new in Labview and I need to do something like I will describe in the next lines.
So, must do a thermostat application. The thing which I do not how to make is this : The resistance of the heater has to be ON for 2 seconds and to be OFF for 55 seconds. This cicle has to go until the set themperature is reached.
Can anyone help me ?
P.S. I use LabVIEW 8.5
Solved! Go to Solution.
02-26-2011 08:42 AM
What are you using to drive the heater? Just a digital line? If so, you just need a delay function between tour writes.
02-26-2011 01:40 PM
I'm using a relay connected to a I/O line. But unfortunately in this project I will use all the I/O ports from my device. The heater problem is only one part from the big picture.
02-26-2011 02:44 PM
Hi Laurentiu,
"But unfortunately in this project I will use all the I/O ports from my device."
Ok, that's fine. But, what the heck, has it to do with using a Delay aka "Wait (ms)" function in your code?
02-27-2011 02:21 AM
Sorry to repeat myself, but I am really new in Labview. I designed my project 'till this part. I spent so many days with it and it is not working. Can someone design this part for me ? Thankyou !
02-27-2011 03:32 AM
Well, we cannot fully solve this unless we know how the rest of the program is architected.
Still, you could do a while loop that spins at a 1 second interval. Divide the interation terminal value by 58 using "quotient and remainder" and do a comparison on the remainder. If it is less or equal one: Heats, else: don't heat.
02-27-2011 08:29 AM
Or even simpler a squence with Heat and wait for 2 sec and then no heat and wait for 55 sec ... However i somehow dont think that's actually what you want to do.
/Y
02-28-2011 01:09 AM
Look, the arhitecture is simple (check the attachament). The .VI is only for one sensor (lm35). I have to remind you all that I am new with Labview and I'm not intending to use it for complex opreation then this. If I made something wrong, please corect me by showing me in a .VI file. I learn fast only by seeing.
So, in order to achieve the set temperature measured with the LM35 sensor, the heating element must be 2 seconds ON and 50 seconds OFF . But this cicle I want to use it for each sensor separately.
Thankyou for your time!
02-28-2011 02:13 AM - edited 02-28-2011 02:15 AM
@laurentiu wrote:
Look, the arhitecture is simple (check the attachament). The .VI is only for one sensor (lm35). I have to remind you all that I am new with Labview and I'm not intending to use it for complex opreation then this. If I made something wrong, please corect me by showing me in a .VI file. I learn fast only by seeing.
So, in order to achieve the set temperature measured with the LM35 sensor, the heating element must be 2 seconds ON and 50 seconds OFF . But this cicle I want to use it for each sensor separately.
Thankyou for your time!
You don't really provide enough information. How many heaters are there, how do you interact with them? If you have multiple sensors and heaters, do the same thing but with an array of heater readings and an array of heaters. Code would be almost identical.
Since your loop spins at a rate of 1Hz, easiest would be to use my method, but of course a more scalable state machine would be more appropriate. Here's a quick draft.

Some of the problems in your code:
02-28-2011 07:32 AM
Hello,
For my application I intend to use sensors for temperature, humidity, CO2%. I intend to measure the environment parameters in a room. This is for my PhD thesis. I must say that I am not a PhD student at a electronic profile University so this is why i do not know how to do it. I just try to handle it the best I can.
Alterbach, I will try the configuration and I'll come back with a replay soon as possible.
Thankyou !