LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waiting for button press freezes program

Solved!
Go to solution

Hello!

 

My problem is that in my example VI is waiting for the OK button to be pressed then to be pressed again, but after the first press, the program gets into a infinite loop or something like that but i don't really get why 😕 Before you ask why do i need this, in my original program a string must be edited so after an "edit" button is pressed the program shall wait for an "ok" button press to accept changes. The important thing that if it is not in edit mode the "OK" button has a different function.

Thx for the help ^^

0 Kudos
Message 1 of 3
(2,058 Views)
Solution
Accepted by topic author Ombre3333

You missed the very basics of event driven programming in LV. I suggest you to read the caveats of LV event structure.

 

The most important rules you missed:

- Never attach more than one event structure in your application to a single event

- Put graphic objects which are sources for events in their appropriate event case

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 3
(2,050 Views)

Thank you! I will reconstruct my program the way you advised ^^

0 Kudos
Message 3 of 3
(2,045 Views)