09-19-2010 01:08 PM
Hey guys,
I'm somewhat new to labview, and I'm working on a relatively easy program right now. Just to fill you in on what it's basically going to do.. It reads a voltage from a NI-DAQ which is hooked up to a machine that controls the filling of a liquid nitrogen phase separator. The voltage is read from the LED, so the signal will be about 0 V when off and about 2 V when filling. Anyway, I want to be able to just count how long the machine is filling (2V) and export this to a spreadsheet. The problem is.. I can't run/test the program with the NI-DAQ right now.. so I need to simulate a signal. I've got the code for most of this complete, by building a global variable. But I was wondering if someone could check my code for the I/O part (the bottom while loop.) It's a simple program.. and I just want to check if I'm close to doing this right. Any help would be greatly appreciated.
Thanks,
Austin
09-19-2010 06:21 PM
You've got some serious problems.
Your outer while loop will never actually iterate. If it did, it would run forever because you have a False wired to its stop terminal. But since you also have a False wired to the inner while loop, that one will run forever, and the outer one will never actually finish.
You have an initial true/false case. If the Filling? is True, then you pass out a file path from the true case. But if it is False, you wind up passing out an empty file path because of the default data being used as the tunnel, and the 2nd while loop begins and will raise an error at the file move function.
You should probably be using a state machine. Beyond that, I can't offer any more advice because I don't believe your current logic your code comes anywhere near showing what you are trying to do.
09-20-2010 10:53 AM - edited 09-20-2010 10:58 AM
Whoops.. yeah.. I see what you mean. This is the basic version that does what I want it to do. It just logs each fill time. And it works fine. I'm just trying to add on top of this. I would like to be able to have a log of the number of fills and avg fill time after each week. So I'm trying to figure out if I should do a wait or a elapsed time or a get date/time function applying the file log I've made throughout the week. Any easy/quick way of adding this? Thanks a bunch.