LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to synchronize controllers in labview

I have three controllers(knop)  that I need to synchronize.  But how could I do that without getting race conditons.? 
 
When one of the controllers changes value, the other shall get the same value. 
 
Best regards,
 
Terje
0 Kudos
Message 1 of 5
(2,689 Views)
Keeping three different controls in sync is easy with the event structure. Create a value change event for each knob and in the event, wire the value of the active knob to local variables of the others. I've attached an example. What I don't understand though, if you want three different controls to always be the same value, why do you need three different ones? Why not use just one?
0 Kudos
Message 2 of 5
(2,676 Views)
The knop could be changed from different locations in the program.   Using events will work, but it will be difficult to extend and for reuse.  Maybe datasocket is ok for this. 
0 Kudos
Message 3 of 5
(2,661 Views)

Events in coordination with global variables... that should do the trick.

 

0 Kudos
Message 4 of 5
(2,652 Views)

I came upon the Three_Knobs.vi example in a search. It fits exactly what I need.

 

But I'd like to toggle this behavior on and off with a Boolean "OK" button. 

 

I put the example in a case structure for the "True" option of the "OK" button. And it works when the the "OK" button is set (True). But what do I put in the "False" option so it doesn't lock up after the first control value change? 

0 Kudos
Message 5 of 5
(88 Views)