03-08-2016 11:39 PM
Hi,
I want to know what is the disadvantages of local variable and global variable
Regards
Ravi
03-08-2016 11:57 PM
Search for the term "race condition".
03-09-2016 04:55 AM
In short, local and global variables are good for storing/reading the latest value of something. This is called a Tag. As long as you have just 1 writer to the tag, things work well. The problem that most people run into is the mutliple writers to a tag race condtion and the using of a tag when a message (should be a Queue or User Event) or stream (likely a Queue) should have been used since you want to make sure all of messages and stream data are processed.
If you make it to NI Week, I will be presenting on this topic (still waiting for official notice).
03-11-2016 01:28 AM