LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

an event trig a loop, how to stop it?

Hi, everyone,
 
Problem came up!
 
I wanted my vi responsed to an event to acquire continous data (loop structure). And I use an event to response to the loop trigger event. Now problem came up! It could not response to any UI events then. What should I do?
 
One solution come up to my mind is the stategy of multithread: a UI thread and worker threads. Yet how to?
 
And any other solutions nothing with multithread?
 
The accessories is demoes of Labview 7.0 .
 
Thanks ahead! 
0 Kudos
Message 1 of 3
(2,409 Views)

In the most general case, you should use two independent loops, onee to hande the user interface and one to handle the data acquisition.

In simple cases, you can just tap into the timeout case, as in the attached modification of your VI (LabVIEW 7.0). Place your acquisition in the timeout case, then use other cases to switch the timeout from infinite (-1) to your desired loop timing as needed. Let me know if you have any questions. 🙂

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

Wah~

It runs well!

Thanks again, altenbach.

I'll try the first approach.

Smiley Happy

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