LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

variables without indicators and controls

Solved!
Go to solution

Hello,

 

Is there a way to create a variable without having a indicator or control in the front panel. I just want to save and update data in the block diagram.

 

Thank You,

Venkat Rao

0 Kudos
Message 1 of 35
(9,325 Views)

The best way would be to keep the data in a shift register or feedback node.

 

There are also shared variables.

 

Can you show us some code so we can give more specific advice?

Message Edited by altenbach on 08-17-2009 09:04 AM
Message 2 of 35
(9,314 Views)

That is exactly what a wire is in LabVIEW!

 

See alsohere.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 35
(9,313 Views)

Hello,

 

I have attached the VI I am working on.

 

On the front panel there are two variable called  Top and Bottom Limit Variables. These variables get their value change inside the inner most case structure. This has no purpose being displayed to the user.

 

What is the most efficient way to change it?

 

Thank You,

Venkat Rao

0 Kudos
Message 4 of 35
(9,296 Views)

Definitely shift registers!

 

 

0 Kudos
Message 5 of 35
(9,291 Views)

Hi

you can use functional global

the another way is to create subVI (let say "ReadLimit.vi", His output is array of limits) and to wire it to shift register

 

Eugene

0 Kudos
Message 6 of 35
(9,287 Views)
The value of the variables can change in either of the top or bottom case structure. how do I wire the variables to know which time to change?
0 Kudos
Message 7 of 35
(9,286 Views)

Hi

 

It seems that functional globals can you help

But, change your main function pattern. use event structure.

 

 

Message 8 of 35
(9,281 Views)

Hi venkat_rao,

 

I'm not sure what you mean by "what time to change". Do you want to know which one to run or know which one wrote to a variable last or what?

Jeff | LabVIEW Software Engineer
0 Kudos
Message 9 of 35
(9,240 Views)

venkat_rao wrote:

I have attached the VI I am working on.


OK, please tell us a bit more about the logic and how the various cases tie together. I assume that only one can be active (discarge vs. feed). If both can be active under some conditions, you would have several locations overwriting locals in arbitrary order with unpredictable results (race conditions!) This means you should have everything in one case structure.

 

There are other race conditions, for example you read from a local variable of the "data array" in parallel of the generation of the data array. Since things occur in parallel, there is no way to tell what happens first. Another race condition! To ensure that the case structure operates on the current values of "data array", you should use a wire instead of a local variable.

 

You also have several cases where you write to a terminal (e.g. ... valve open" in one case and to a local variable of same in the other case. Again, you should place the terminal outside the case structure and just wire the indicator to te same wire that goes to the case selector. No need for diagram constants and local variables. right?

Message 10 of 35
(9,227 Views)