LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

global variables odd behaviour in projects

Tim is getting to the point regarding the reason for the behavior you are seeing.  The LabVIEW help file has some good discussions about "Application instances"  What they are and how to identify what AI the vi you are dealing with is open in. 

 

Hint: look at the left of the bottom boarder of the panel.  see that Application instance NAME?  Right click that name---- what can you do if the vi might be in multiple app instances?

 

Make an edit to a vi that is open in multiple app instances-  What is with those green arrows next to the run arrow?

 

Again: The NI LabVIEW development team gave you some pretty powerful and cool tools to work with... if you take the time to learn about them


"Should be" isn't "Is" -Jay
0 Kudos
Message 11 of 21
(1,164 Views)

@jcarmody wrote:

@Ranjeet_Singh wrote:

Although didnt read the question but I also faced same problem earlier. Replace global with local. This solved mine


Although I didn't read your response, I'm sure you're wrong.


Untill and unless you haven't seen dont judge it. I had similar problem 2 yrs back and I did this and till now I have implemented this on more than 100 PC and 20 projects and works great.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 12 of 21
(1,143 Views)

@LV_Pro wrote:

A local variable is called "local" because its scope is local to the vi that it is in, and it is directly connected to a control/indicator in that vi. It won't work with sub-vi's or more importantly, vi's running in parallel to the vi they exist in.


In my case only one VI will be active in project hence I was using main VI to update the local variable. later before calling any subVI I used to pass this value to all this subVIs. 

 

I havent seen what he has done and didnt read his post too. If he is using same case then this is best way to avoid GV.

 

What he can do main VI where local variable is updated. In that main VI all the subVI will be passed and to all of them in and out will be local variable. Once any subVI will update the LV all will be updated.

 

 

 

 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 13 of 21
(1,143 Views)

 

as for as i know application instances correspond to a project ( All VIs open outside a project belong to main application instances )

and global variable cant work across application instances.( so give default value )

 

0 Kudos
Message 14 of 21
(1,132 Views)
Ranjeet, please stop supplying "answers" to posts you openly claim you have not had the courtesy to read. It is very counterproductive.
Message 15 of 21
(1,123 Views)

@Intaris wrote:
Ranjeet, please stop supplying "answers" to posts you openly claim you have not had the courtesy to read. It is very counterproductive.

Thanks for the suggestion but I am giving answer which is very much relevant to the question. I know its not a good thing but you see I am very busy with my project and hence sometimes time is an issue. But I will keep this is mind in future

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 16 of 21
(1,096 Views)

@Ranjeet_Singh wrote:

Thanks for the suggestion but I am giving answer which is very much relevant to the question. I know its not a good thing but you see I am very busy with my project and hence sometimes time is an issue. But I will keep this is mind in future


How do you know it's relevant if you haven't read the original post?

0 Kudos
Message 17 of 21
(1,082 Views)

Thats what subject does. I had same problem in my project long back

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 18 of 21
(1,070 Views)

0 Kudos
Message 19 of 21
(1,055 Views)

Thats what subject does. I had same problem in my project long back


that's kind of odd behaviour Smiley Wink

2 projects 1 long back , 1 recent and communicating through global thinking.................

in between

p.desai did you resolved this problem

 

 

0 Kudos
Message 20 of 21
(1,046 Views)