02-09-2010 07:45 AM
02-10-2010 01:03 PM
Hi mrbean,
The Shared Variable pallete that you have found is useful in certain cases, namely if you would like to create a large number of shared variables programmatically, or if you would like to be able to programmatically change which shared variable you write to. Using the LabVIEW Shared Variable details some of these use cases near the middle of the document (search for programmatic access) to quickly jump there.
Hope this helps!
07-18-2014 05:59 PM
Hi,
Thanks for the description but I am still not able to understand what does "open variable connection" or "close variable connection" does. It seems "write" or "read" alone will work. Plus, I can construct illogical block like this:
07-18-2014 06:14 PM - edited 07-18-2014 06:15 PM
Opening takes ms, reading takes usecs. To prevent the first call of read or write from taking an unusually long amount of time, you can open everything up front and close everything down at the end -- this can be especially bad in time critical code.
The API also helps keep your code organized and understandable: to put it simply, you dont *want* to make illogical code like that, so you follow the open read/write close pattern instead.