LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Global variable value update to indicator on run time

Nobody is going to make or change anything for you, unless you start taking in the advices that you get here.

It is impossible to make or change anything with the current information that you have given.

You need to explain in details what you want, what the device your are talking to should receive and what is sends back.

And you need to give us the right vi's with the right names!

Message 51 of 58
(1,348 Views)

Hi All,

 

I already shared all information, what is sending and what is recieving.

 

i only need how to make it work for one indicator.

 

Regards

Punith

0 Kudos
Message 52 of 58
(1,335 Views)

you have several options to update indicators programmatically

e.g. directly in a loop, property nodes, local variables, inside an event structure driven by user events

 

in general you whole setup would possibly be perfect to apply the producer-consumer pattern and to transfer the data either use queues or user-events

 

if you have a labview subscription, then you can go through the self-paced-learning tutorials

http://sine.ni.com/myni/self-paced-training/app/main.xhtml

you must use the login, with which your labview stuff is registered.

 

 

 


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

Thanks for your reply,

 

In my case it is different .

 

1. i dont have loop, only recursive fuction call makes the code to execute in loop.

 

2.. I tried by user event interface which is working only if i dont have recursive call in my subvi.

 

3. How to do with local varibales since i have two vi one subvi and one main.vi.

 

4. Is it possible to run threads in main vi?. So that i will create 26 global variables  and connect those to 26 ouputs and in thread (which is executing in while lopp) i will update gloabal variable to indicators.

 

Regards

Punith

0 Kudos
Message 54 of 58
(1,310 Views)

using global variables is also possible,

you should be aware of "dirty-reads" .. meaning you read old data, bc the global was not updated yet.


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

Man, I don't know what else to tell you, at this point I'm just paraphrasing what has been said before.

 

You cannot update an indicator if it doesn't run in a loop. Dataflow prohibits that.

 

If you want further help, you should make clear(er) what you have tried and what exactly is not working.



Remember Cunningham's Law
0 Kudos
Message 56 of 58
(1,287 Views)

@punee wrote:

The subvi_test1.vi itslef LAB_VB_AVTV2_data_calculation.vi .

 



You did not attach Lab_VB-AVTV2_data_calculation.  You only have subVI_test1.vi   That subVI calls the data_calculation.vi.  It is not calling itself because they are two different VI's with two different names.

0 Kudos
Message 57 of 58
(1,280 Views)

@punee wrote:

Thanks for your reply,

 

In my case it is different .

 

1. i dont have loop, only recursive fuction call makes the code to execute in loop.

 

2.. I tried by user event interface which is working only if i dont have recursive call in my subvi.

 

3. How to do with local varibales since i have two vi one subvi and one main.vi.

 

4. Is it possible to run threads in main vi?. So that i will create 26 global variables  and connect those to 26 ouputs and in thread (which is executing in while lopp) i will update gloabal variable to indicators.

 

Regards

Punith


1. You need a loop

 

2. Without showing us what you have done, that did not work, we can't help you

 

3. Local variables is only for the vi they are made in. But it is possible to make a program without any local variables.

 

4. Threads in LabVIEW is not something you can control, but as LabVIEW is executing is code parallel by default you can think of a while loop as a thread. This is an over simplified answer, there are multiple thread on the forum talking about threads in LabVIEW and also some whitepapers.

0 Kudos
Message 58 of 58
(1,270 Views)