LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass data between two While Loops

Hi,

I have two while loops running simultaneously. Major while loop has a user STOP button control to stop the VI. Minor while loop must read the same STOP button status from the major loop and STOP minor loop as soon as STOP button pressed.

I tried local variables, property node but they did not pass status of STOP button from major to minor while loop. Tunneling will not work for sure but why property node>value is not working?

Suggestions and help will be highly appreciated.

Thanks,

Kishor
0 Kudos
Message 1 of 8
(4,158 Views)
Change your Stop button
"Switch when pressed"
under mechanical action.
By default your bolean button was set to
"Latch when released"

If you do not know how to change,
right click on your bolean button and then you will see "mechanical action". and select "switch when pressed". switch when released will work also.

Best Regerds,
S.N.Aye
0 Kudos
Message 2 of 8
(4,158 Views)
Hope these VIs help you in one way or another.

Cheers
ian
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 3 of 8
(4,158 Views)
Thnak you for your support
0 Kudos
Message 4 of 8
(4,158 Views)
no worry
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 5 of 8
(4,158 Views)
Hi,

I am trying to do same thing as shown in your example but it did not work, I tried several different ways including occurrences, still it did not work. I think my major loop is data acquisition and writing to file, where as minor loop is sound acquisition and writing to a separate sound file and CPU is consumed 100% so pressing STOP may take very long time to communicate between the loops.

As per your example, it works but same thing did not work with lots of CPU overhead. Any suggestions are welcomed.

My aim is to store data file and sound file separately and simultaneously, using separate while loop, and I need a common STOP button.


Thanks in advance,

Kishor
0 Kudos
Message 6 of 8
(4,158 Views)
Uzytkownik "Biomedical Signal Processing" napisal w wiadomosci
news:506500000005000000AB290100-1042324653000@exchange.ni.com...
> Hi,
>
> I am trying to do same thing as shown in your example but it did not
> work, I tried several different ways including occurrences, still it
> did not work. I think my major loop is data acquisition and writing to
> file, where as minor loop is sound acquisition and writing to a
> separate sound file and CPU is consumed 100% so pressing STOP may take
> very long time to communicate between the loops.

So may be you should use any WaitUntilNext function let's say with 20ms
inside both loops?

Mikrobi [ZbStS]
0 Kudos
Message 7 of 8
(4,158 Views)
oh yeah, as Mikrobi mentioned, do add a small loop delay (25ms to 200ms) into all loops to free the CPU.

Note: Be very careful of the loop delay(ms) between acquiring loop and processing loop.

My apologies!
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 8 of 8
(4,158 Views)