From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-02-2011 09:42 PM
Dear forum members,
I was expecting that shared variable of a control will work across 2 VIs as its local variable in the same VI?
Why it doesn't work?
Thanks in advance,
Rani.
05-02-2011 10:29 PM
What do you mean by "shared variable of a control"?
Controls don't have shared variables. Shared variables are stored in libraries that get deployed when you run your VI.
What are you doing that you say "it doesn't work"? Post your VI's and shared variable library so we can see what you are doing.
05-03-2011 04:37 PM
Hi,
Thank you for the reply. Attached is a simple vi that show that a share variable created for Boolean does not work like local Variable.
What I'm really trying to do is to communicate a pressed button (Boolean) on RT target to the Host. Any suggestion?
Thanks,
Rani
05-03-2011 04:46 PM
Did you create a project that contains both your VI and your shared variable library?
You do know that the 2nd loop in your VI will not run until you've hit the stop button due to the data dependency created by the wire runing from the first loop to the second. Don't you?
05-05-2011 11:21 AM
Hi,
Sorry for the delay with my response.
Yes, I did have the vi and the variable library in a project.
I finally realized my mistake, when I created the Shared Variable I should have left it connected to the Boolean control. (modified vi attached).
Thank you for replying and for the heads up with the stop button wire, I have much to learn about Labview.
Rani.