12-05-2011 11:20 AM
hey, my alarm system is working 80% as i want it to do, it measures the amount of gas found in the lab, but im having some problems in the time settings, Where t is the real time in milliseconds, measured from the moment you start the program.
For workers working 8 hour shifts, the safety limit for these two gases is 45ppm for CO and 25ppm for NH3.
here is my program file attached.
thanks
12-05-2011 12:41 PM
Using i (number of iterations) as a proxy for t (seconds) is not a good idea. Without knowing exactly how fast your loop runs, there is no way to make sure i and t are the same thing.
Also, you're multiplying i by 1000 when I think you want to divide by 1000.
Here's my fix. It uses real time (tick counter) for t.
12-05-2011 12:49 PM
Also, I'm not sure why you're checking the values five times in each loop. You're going to get exactly the same anwer every time. Just check it once and be done with it.
12-05-2011 02:10 PM
the output isnt like what is recomended for the graph and for the 5 leds, the values calculated are wrong because the unit should be parts per million and the graph is too slow.
12-06-2011 01:29 AM
Hi Abook7,
if you wait five time 300ms in your main loop, your graph will be updated every 1.5 second.
Here is your friend struggling with the same homework, you might get some ideas from there:
http://forums.ni.com/t5/LabVIEW/Display-on-Waveform-amp-Problem-in-the-Data-Flow/td-p/1785388
BR,