LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

two while loops running independently and pass results to each other independently

Hello,   my head ache is as follows... I've got two while loops, first is pwm generator + .vi who converts and sends these pwm signals to LPT port, second while loop contains .vi that gets keyboard presed keys and desides the value of pwm in first loop, but I want that first loop runs continously withaout waiting on second loop. Respectivly first loop runs  vitaly inportant PWM, but not waiting for signal from keyboard,  but when it is redy first loop takes it into acount.
0 Kudos
Message 1 of 3
(2,320 Views)

Very hard to offer a real comment without seeing you code, could you post a picture of your block diagram.

 

I am not totally sure what your requirement is from your description but it sounds like you want a single loop and in that loop you want an event structure to look after the keyboard inputs.

 

So I suggest you take a look into Event Structure.

 

cheers 

 

dannyt

 

 

Danny Thomson AshVire Ltd
0 Kudos
Message 2 of 3
(2,314 Views)

One solution (i think the best) is to use functional globals. So simple!

You can use simple globals, but you can have race contitions.

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