| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi, Could you tell me the difference between the "global variable" and "reference" ? If i create a control in a VI and i need to use its value in a subVI should i use a reference or a global variable ?In the other hand, if i create control in a subVI and i need to use its value in a VI should i use a reference or a global variable ?If you could explain me by a VI that would be wonderfulThx, |
|
#2
| |||
| |||
| Hi Samer, I wrote the <a href="http://forums.ni.com/ni/board/message?board.id=170&thread.id=240328&view =by_date_ascending&page=1" target="_blank">Action Engine Nugget </a>to illustrate a safe and effective way of sharing data between multiple thread. Re: your Q Both gloabl variables and reference>Value are subject to potential race conditions. Globals require all of their instances be updated anytime one is updated. So they dont' scale well either. References force a thread switch to the UI thread (single thread so this is a bottle neck) So PLEASE take a look at that Nugget. Thank you, Ben |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.