LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Thread real time indicating

Solved!
Go to solution

Hi everyone

 

I would like to have two (or more) threads (while or for loops), which changes a value, data, whatever in each etaration, and indicate that with an interface thread, which is independend from the others (so I have only one indicator for more threads). Something, like (just as a dummy example):
 Dummy Example

 

Is this possible, and if so, then how?

 

 

Thanks in advance.

0 Kudos
Message 1 of 8
(3,073 Views)
Check Synchronization Examples using Queues,Notifiers and rendezvous in Labview. Then you can get idea.
Thanks
uday
0 Kudos
Message 2 of 8
(3,071 Views)

Thanks, but I already tried with a queue, like:

Queue thread

 

but the indicator thread waits until the worker thread finishes, and then shows the values.

 

 

0 Kudos
Message 3 of 8
(3,068 Views)
-I didn't understand which indicator you are talking about.
-You have given Queue length as 1, which means it can accomodate only one value in buffer.
-For second loop N, you ave 1, which means dequeue will be done for only once.
-And the Producer will be waiting forever, because the buffer is full and no one is removing the elements from queue.
-Please correct accordingly.
Thanks
uday
0 Kudos
Message 4 of 8
(3,063 Views)

Yeah, I forgot to change it back to 5000 (N for the first loop), but it still doens't do what I want.

Now I have two threads. One is changing the value, the other one is showing, but after each other, not simultaniously. 

0 Kudos
Message 5 of 8
(3,057 Views)
Use rendezvous in that case.
Thanks
uday
0 Kudos
Message 6 of 8
(3,052 Views)
Solution
Accepted by topic author javince80

Ok, this works now:

lve.png

 

Thanks anyway.

0 Kudos
Message 7 of 8
(3,045 Views)
It might work now. But there is serious problem of race condition can happen with Local variables.
Please be aware of that.
Thanks
uday
0 Kudos
Message 8 of 8
(3,040 Views)