LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open file problem

I have attach a vi that open .lvm file whenever i pressed the open button. The problem is when i try to reopen while still in the while loop, it can't open a new file and blank the graph. What is my problem of my VI? Thanks.
0 Kudos
Message 1 of 6
(3,009 Views)
(I have not investigated why it acts as observed, but there is an easy solution.)

A workaround would be to just prepend a file dialog and uncheck "Ask User to choose file" in the express panel (See attached VI).

Btw, you should really put a wait in that loop, your loop runs at maximum speed, gobbling up all CPU. Alternatively, an event structure seems more appropriate as in my suggestion.
0 Kudos
Message 2 of 6
(3,009 Views)
Additional note: Sorry, I should have also added an event for the stop button. Modify as required.
0 Kudos
Message 3 of 6
(3,009 Views)
Sorry but i do not how to add a event to my stop button. I very green horn to labview. Can u teach me how?
0 Kudos
Message 4 of 6
(3,009 Views)
You just add an event (right-click on the event structure..."add event case") which then monitors the stop button (..which connects to the loop condition of the main loop (see attached modification)). Note that the tunnel is set to "Use default if unwired", so all other events keep the main loop running.
0 Kudos
Message 5 of 6
(3,009 Views)
Thanks. You have been of great help
0 Kudos
Message 6 of 6
(3,009 Views)