LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Program Frozen

In fact, I want add a rest button for my program, however, when I add the event structure for the value change of the reset button, the program frozen. Anyone can help ?

Untitled.png

0 Kudos
Message 1 of 7
(3,485 Views)

Never use 2 event structures in a program unless you really really know what you're doing. You should have a look at the Producer/Consumer architecture.

 

EDIT: have a look at this document, and this page.

 

Ben64

0 Kudos
Message 2 of 7
(3,473 Views)

thanks, I see.

so how to realize my "reset" function ?

0 Kudos
Message 3 of 7
(3,466 Views)

Have a look at the links (especially the second one) in the edited version of my post.

 

Ben64

0 Kudos
Message 4 of 7
(3,463 Views)

The reason your program freezes is that both event structures are in the same loop.

 

When your "Reset: Value Change" event fires the bottom event structure exits but the loop does not iterate until the top event structue also exits.

 

The easiest solution would be to handle both events from the same event structure.

0 Kudos
Message 5 of 7
(3,460 Views)

I put them into one event, still not working properly

222.png

0 Kudos
Message 6 of 7
(3,443 Views)

Duplicate thread.  Please keep all the discussions in a single thread.  I helps prevent fragmented discussions.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 7
(3,434 Views)