08-24-2009 10:33 AM
Hi all,
I am trying to control a DAQ board (Data Translation, DT9816) through LabVIEW. What I am trying to do is to send "one" to one of the output ports when a temperature value falls out of a specific range and send "zero" when it falls within the range. I tried to do that with a case structure. But when the condition is met, computer send "one" to the ports but when it is not met, it did not cease sending "one". I attached the code provided by manufacturer of the DAQ board (Dout Single.VI) Could you please send me an example VI for the implementation of the idea?
Thanks
Deniz
Solved! Go to Solution.
08-24-2009 10:38 AM
I haven't worked with that DAQ board recently, but most require you to set the output to the state you want, in other words, once set to hi ("1") it will stay there until set to low ("0"), so your case statement would have to set it to low when the condition is no longer met. Didn't get a chance yet to look at your attached file.
08-24-2009 11:41 AM
Thanks for the reply,
I tried to implement the idea with the while loop (see attached 3650_revised.VI). When the temperature is out of range at the beginning of the program, computer sends one to the board and when it is in range it sends zero. But when the code does not respond to the changes that are made after the run button is hit. I mean, the program works according to the value when the program is run for the first time. I guess this is due to the small while loop's (sending 1 or 0) conflicting with the big loop. Also, I recongnized that the small while loop messed up the rest of the code. (The case structure used for recording data from another instrument, it is also based on a comparison of required temperature value and the thermocouple reading)
How can I make the three function work alltogether properly? The three functions are indication of thermocouple reading is in range or not, sending 1 or 0 to the DAQ board and recording data when a specific condition is met.
Thanks again
Deniz
08-24-2009 02:09 PM
Why do you even have a while loop to continously send a logic 0/1 out? It will keep running until you click the stop button and of course the rest of the code is paused. One write without a loop should be enough.