LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing path name in active while loop.

Hi, I have a while loop that continuously executes until I turn it off from the front panel. I have two difficulties with it. I would like to be able to change a path name within the loop while it is running, but not to be prompted. I want the loop to realize the value has changed. The other problem that I have is that the display flashes when I do have it loopingwith a constant path. I am new to Labview and I am sure these are easy fixes, but I am spending too much time trying to figure them out on my own. I would greatly appreciate any help. Thanks!
0 Kudos
Message 1 of 5
(3,003 Views)
You probably want to put the terminal for the path control inside the loop. This way, the value is read during each iteration.
Message 2 of 5
(3,003 Views)
Thanks for your help. Unfortunately, I still haven't fixed the problem. Attached is a simplified version of what I am trying to do. I want to view the graph, and be able to change the path without having to restart the VI, however the way I currently have it set up, I am prompted every iteration for a filename. I have experimented with shift registers but to no avail. Any more ideas?
0 Kudos
Message 3 of 5
(3,003 Views)
Try setting the path before running the VI.

"Read From Spreadsheet File.vi" will invoke a dialog whenever the path is empty, so it will keep asking for a path. Even when you give a path, it will not set the path control in your VI, so you'll be prompted again the next iteration. Another way of fixing it is to move the path control outside of the while loop and wire it through the while loop by a shift register. For the right side of the shift register, wire the resulting path from "Read From Spreadsheet File.vi".

I don't have a version of 6.0 installed on me, so it might not help for me to attach a VI. Let me know if this makes sense.

-Lars
0 Kudos
Message 4 of 5
(3,003 Views)
Hi Lars-
Thanks again for helping me figure this out. Setting a default path is all it took. The VI does exactly what I want it to now. I was unable to get the shift register thing to work, as the register does not appear to check for a new path each iteration. But this is not necessary, it works great with some default values set.
Cheers,
Nate
0 Kudos
Message 5 of 5
(3,003 Views)