03-07-2006 12:38 PM
03-07-2006 01:36 PM
03-07-2006 01:45 PM
Actually, the elapsed time functions have targets of 5 and 10 seconds (just right click and select properties).
From what I can tell, the formula node in the center of the diagram has an infinite while loop. It is this that is hanging up the program. The while(1) has no break statement to exit the loop.
03-07-2006 02:12 PM
Hi Dennis
Thank you very much for solving this problem of mine. That did take care of the frozen output. Any suggestions on how I can do modular programming?
Thanks
03-07-2006 02:26 PM
03-07-2006 02:36 PM
03-07-2006 02:52 PM
I will just explain modular programming. Its just another term for block processing. What I intend to do is fake real time programming. You got me right, I have two LVM files because I want to process them alternatively. I want to wrtie to one file, while the other is being processed. Since I cannot read and write from the file at the same time, I have taken this approach. I want to give 5 seconds to each file to be written, then the next 5 seconds, the file is read by MATLAB is processed (while this is happening, data is being written to the other file for 5 seconds), and at the end of 10 seonds, the file is reset and fresh data is input to the file.
I hope this helps understand what I am trying to do. I am having a timing issue with this. I am only able to write to one file contineously, and it doesnt even get reset after the time elapses.
Another thing I noticed that the time elapsed indicator for the 2nd timer is always ON. That is weird.
03-07-2006 03:22 PM
If you just want to swap between two files, look at the attached VI. If uses a single elapsed time function, a shift register, and an exclusive or to make a Boolean high or low for 5 seconds. This is wired to the enable input with one of them inverted.
Also, you might want to think about using something other than Write LabVIEW Measurment File. It's not the fastest function in the world. It would be much faster to open both files outside the while loop and then inside, use the File Write primitive. You can put them inside a case statement to enable/disable the one you want.
Why is it weird to have an elapsed time indicator always on? That's what it is supposed to do - show a running elapsed time.
03-07-2006 03:37 PM
03-07-2006 03:51 PM