LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

run once

In a Labview application I am programming inside a case that is inside a while loop. The first time into the case I want to open a spreadsheet file and begin logging data to it. How do I open the spreadsheet file the first time into the case and keep the same file open until I am finished writing data? I have been able to open a file and write to it, but every time the loop runs, the program opens another file. The file is named with the system time as mmddhhmm.
0 Kudos
Message 1 of 3
(3,520 Views)
Hi,

Attached is a small LV6.1 example.

Hope it helps

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 3
(3,520 Views)
Try using a shift register on the while loop (right click on the edge of the loop). Wire a TRUE to this from the outside of the loop and have a case statement that opens the file if it is true inside the loop. Then, wire a FALSE to the other out (right) part of the shift register.

This way, it is true only the first time running through the loop.

Another way would be to open the file before entering the loop and closing it after the loop is complete...


Naveen.
0 Kudos
Message 3 of 3
(3,520 Views)