LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Global variable value update to indicator on run time

The string in main vi should change to write permission to make as an indicator, sorry i missed that.

 

Regards

Punith

0 Kudos
Message 31 of 58
(2,007 Views)

Did any one know solution to my issue?.

 

Regards

Punith

0 Kudos
Message 32 of 58
(1,991 Views)

I'm sorry, but you have to start listening to the suggestions here at some point. From what I see here, you didn't try to use the user events, because there are no user events anywhere in your program. I personally think user events is a good way to do this, but probably not the best for a beginner to understand. As mentioned before: Your main VI does not contain a while loop, so it will be really difficult to update the control even once it becomes an indicator without the loop. An indicator is only updated when called in a loop. Why don't you start with that and then try to explain what you are trying to achieve here, so we get a better understanding of how to get you there.

 

And get rid of those in place structures.



Remember Cunningham's Law
0 Kudos
Message 33 of 58
(1,983 Views)

Hi Peter,

 

Thanks for your kind reply.

 

Yes i will remove all in-place structure later.

 

I  missed while loop in main.vi, actually i have while loop in my real code.

 

With while loop could you suggest how to do this?.

 

Regards

Punith

0 Kudos
Message 34 of 58
(1,973 Views)

Why later and why are you not showing us the real code?

 

When you a beginner in programming you need to show us the real code that you are working on.

 

Then you need to make small test of you code through the development, and you need to give us some information about that.

What is the device that you are talking to?

What are you sending to the device, and what are you receiving ? How offen is this going to happen?

 

Once we know a lot more about your task we can guide you in the right direction. 

But you need to follow our advice, and implement them right away. Do not wait on removing the IPS.

0 Kudos
Message 35 of 58
(1,961 Views)

1.I am talinking the embdedded board through tcp/ip commucnication.

 

2. i will send some commands to board which intern send resonse which is in hex string foramt.

 

3. The output i am passing to recursive subvi which do some caluclation on output and set to indicator which in main.

 

in recursive subvi there are 26 outputs and i need to set 26 indicators in my main.

 

If you tell how to do for one indicator i will get know how to do for remaining.

 

Since the code is highly confidential i cant share much information about coding.'

 

Please suggest me how to solve this.

 

Regards

Punith

0 Kudos
Message 36 of 58
(1,953 Views)

No, I cannot.

 

Look, we all want to help you here, but it is simply impossible to do so if you have one code that you are programming and one code you share with us. It's like owning a 2015 Corvette and phoning your mechanic to ask how to fix a 1954 VW Beetle. There were several suggestions on how to fix this ranging from beginner to expert. So far I have not seen any attempt to incorporate any of them out into your code.

 

The preferred way to achieve what you want to do here is to have a top level while loop and route the output of the VI out with wires, thus avoiding global variables, user events and queues all together. That is assuming that you don't really need recursion, which I might just be the case.



Remember Cunningham's Law
0 Kudos
Message 37 of 58
(1,949 Views)

Do you really have a recursive subVI?  Or do you mean re-entrant subVI.

0 Kudos
Message 38 of 58
(1,931 Views)

i don't think the difference is clear atm. as are most of the basic programming-paradigms of labview.


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 39 of 58
(1,927 Views)

Hi Peter,

 

No i need recursion , i cant go without recursion.

 

The glaobal variable i will remove later , with while loop could you tell how to do?.

 

Regards

Punith

0 Kudos
Message 40 of 58
(1,924 Views)