LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to associate a Global Variable to controls?

Hi,

 

 I've learn about how to create global variables. However, I need to associate a global variable to some controls/indicators I already have in my front panel (not creating a new front panel). Is it possible?

 

  Portuguese:

 

  Olá. Eu aprendi sobre como criar variaveis globais. No entanto, eu preciso associar estas variáveis a alguns controles e indicadores que eu já tenho no meu painel frontal, não criando um novo painel frontal com novas variáveis. Isto é possível?

0 Kudos
Message 1 of 4
(2,572 Views)

You place the Global Variable that you created to the block diagram... then right click and select either 'Change to Read' OR 'Change to Write' to read from or write to global variable.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 2 of 4
(2,565 Views)

@1M2S wrote:

 I've learn about how to create global variables. However, I need to associate a global variable to some controls/indicators I already have in my front panel (not creating a new front panel). Is it possible?

 



You cant associate a Global, you read and write it as needed, but it's a separate variable. In this case you'll simply read the global and write the value to an indicator, or the other way around. Be careful of race conditions, local variables and Globals are equally tricky in this regard.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 4
(2,560 Views)

Perhaps the question should be "Why do you want to use a global variable?" In most cases there are better ways to get data from a control to where it will be used.  

 

Please tell us more about what you are trying to do.

 

Lynn

Message 4 of 4
(2,524 Views)