LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

send command from loop to start a parallell loop

Hallo!

In my mainloop that I want running all the time, there is a boolean
or something that starts a parallell loop to the main! I dont want
the second parallell loop to run all the time, only on command! And when the
second loop is done, only the main continue running. Then the second parallell
loop is again ready to run on the "command".

Is there a way to fix that?

Thanks, Fred
0 Kudos
Message 1 of 7
(2,573 Views)
Hi Fred

You could use Notifiers. This also allows you to exchange a value between your two loops.

Just have a look at the attachment.

Hope it helps.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 7
(2,561 Views)
Unless you really have severe timing problems, a nearly empty timed loop running in parallel does not add a significant pressure over the processor.
Anyway, there is a positive answer to your question. Use an occurence node (belong to the synchronization vi's sub-palette). As you will see in the attached sub-vi, that belongs to more advanced programmation techniques, although I'm not sure that the example is optimal 🙂
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 3 of 7
(2,559 Views)
Hi Charley,
I was interested in the question but I could not open the zip file,could you please post the vi again???
Regards.
ohiofudu.
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 4 of 7
(2,550 Views)
Back with .zip...

CC
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 5 of 7
(2,534 Views)
thanks for the tip
0 Kudos
Message 6 of 7
(2,469 Views)
thanks!

I choose two parallell loops and hopes the processor handles that. The second loop
runs empty most of the time.
0 Kudos
Message 7 of 7
(2,468 Views)