LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write into text file but not continuously

Hi to all........
In my program, I have 7 to 10 case(true/false(T/F)) structures. This program receives data continously from serial port and based on received data all the case structures execute the code and give pre-specified text output (based on true or false). I wish to note this text output from each case structure into a common .txt file, but not continuously. when ever text output changes from structures(from T/F or F/T ) only, I want to append the new text output to the existing one. Throughout the test I write text output into same .txt file. Breafly, I wish to keep track of shift between true/false structures.
I tried it.....but text output writing into the file continuously. But, I need only when shift between T/F structures.
I searched in forum, but I didn't get it. If it's already answered, pls give me link.

Thanks.....

Ravi
0 Kudos
Message 1 of 4
(2,859 Views)

Use shift registers or feedback nodes to compare the current value to the value from the previous iteration, then appened to the file only if the values are different.

Lets assume all the substrings are conbined into an output line. In this case you could just compare the old line with the new line and wite to file if anything has changed.

If you want, attach your code so we can give more specific advice.

 

 



Message Edited by altenbach on 12-29-2007 11:41 AM
0 Kudos
Message 2 of 4
(2,843 Views)
Hi...Thank you very much....... it works for one case structure......I will check for all combination(for 7 case messages to same text file) and inform you....

Thank u

Ravi

0 Kudos
Message 3 of 4
(2,838 Views)
Hi......It works as required with all case structures together. Thank you very much.....

Ravi
0 Kudos
Message 4 of 4
(2,823 Views)