04-23-2015 07:35 AM
In a previous Discussion Post the user was refered to an example here: https://decibel.ni.com/content/docs/DOC-21163
In the block diagram ( Main.vi) of the Project is an "icon" of the STOP button w a globe in it..I'm guessing thats a global variable.
Why is the developer using a global variable ?? Why not just a local?? What is the "variablelib.lvlib" that this stop button is contained in and why is it used??
Thanks..
Solved! Go to Solution.
04-23-2015 07:58 AM
Hi Clint,
that's a shared variable.
Their advantage is: they allow access (read and write) over network connections (and they allow DATAFLOW due to their error IO).
In the referenced example you are able to stop the dialog from a different VI, executable or even a remote computer…
04-23-2015 08:34 AM
Thanks..so how do I create that same type of llb for my project..I want the same idea. I want to "STOP" two loops simutaneously if a condition is met. Can I use the examples STOP button?? How do I copy it over from the example to my program and link it to the llb?
04-23-2015 08:40 AM - edited 04-23-2015 08:40 AM
Hi Clint,
you should use a "usual" global variable when you have two loops within one VI/program. No need for shared variables then.
To answer your question:
You create shared variables within your project. Just right-click your project tree and select New->…
Use the correct LabVIEW terms: shared variables are maintained in lvlib files. These are different things than LLBs!
04-23-2015 08:41 AM
thanks for the quick response..
04-23-2015 09:05 AM
Let's sort out the few main variations of variables.
Local variable - use in different locations in same VI.
Global variable - use in different locations in different VI's on the same PC
Shared variables (networked) - use in different locations in different VI's on different PC's