LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simple question for you

Hi.
I've got a labview program, but i need change something, but i don't know how.

In attachement is a library and inside is my program in zzz.vi file.
The program is working, but when I run it. the program ask about a file with data.
And i need to change that, and it schould work like that:
When i run this program i sholud do nothing. But when i push the big "OK" button
the the program should ask about the file and do other procedures ??

I;ve tried a lot of ways , but it is still not working correct 😞
0 Kudos
Message 1 of 4
(3,275 Views)

Place all your code (including the OK button) inside an event structure and set the event for "OK Button: value changed". That's it.

If you want to keep the VI running and load a new file whenever the OK button is pressed, place a while loop around it and add an event for the stop button.

See how far you get.... 🙂

(Ideally, you should also add some logic, for example if the operator presses the cancel button at the file dialog, you probably would want to skip the rest of the operations. If this is a subVI, you might also want to set it to "clear indicators when called".)

0 Kudos
Message 2 of 4
(3,269 Views)
OK
The first part is working.
But i've also put the stop button and it is not working.
So I've to stop the program from the "abort execution button".
Can you tell me why ?

0 Kudos
Message 3 of 4
(3,245 Views)
  1. Put the OK button in the OK button event case (This way the latch action resets once the event is triggered).
  2. Go to the timeout case and change it to  "Stop:value changed" (you don't need timeout functionality at all), place the stop button in it, and wire it to the stop terminal of the loop. The output tunnel will be to "use default if unwired", so the other event won't stop the loop.

 

0 Kudos
Message 4 of 4
(3,238 Views)