LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sub vi shared variable

I've got a sub vi... And i make a shared varibele(boolean) truewhen the sub vi is called and press 'ok' he returns to the main vi.... But he doesn't make it true, i have it in an event case when the button is called....
 
Can anyone help me??
 
0 Kudos
Message 1 of 8
(3,282 Views)
Hello, marten
could you attach your VI?
Thank you.
Michael
0 Kudos
Message 2 of 8
(3,279 Views)
this is it...
Download All
0 Kudos
Message 3 of 8
(3,274 Views)
marten,

i don't understand your issue. The VI you posted reads a bunch of variables once, and in parallel wait for something to happen. If something happens, either a VI is called, a variable is written (which is in fact never read again!) or you discard the panel close.....

So as far as i can see, the VI is only doing what it is programmed to do; so to say it's a "works as intended".....

Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 8
(3,270 Views)
I'm new with labview and i'm used to c++ code or pascal....
 
What i am trying to do is...
 
initialisation(buttons calibrate and measure are disabled and grayed) --> Adjust (variable instellen becomes true and button calibrate wil get enabled) --> and when this procedure is handled that measure will be enabled....
 
Now have i in the sub menu a shared var: intellen and if you close thad sub vi he will become true but i can't make this happen and don't understand it..
 
Maybe its real easy.... 
0 Kudos
Message 5 of 8
(3,268 Views)
marten,

the content of the variable should change indeed, but in your program, you will NEVER see this!
The reason is that you read the value of the variable only ONCE, most likely at the start of the application.
If you want to check the functionality of the writing, either put the reading in a loop as well or just use the variable manager from LV to observe the variables.

Since you correctly stated that you are new to LabVIEW, i suggest you to take a look into design patterns for applications which are provided by the template browser. You can find that browser by selecting "File -> New".

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 8
(3,254 Views)
oke thank for your help it works now..........
 
so the background of the block diagram will be exceeded when the program is called(opened)?? Or also when all the loops are exceded and he isn't 'in' a loop anumore??
\
0 Kudos
Message 7 of 8
(3,251 Views)
marten,

just for clarification:
Loops in LV are like For{} or Do{}while-loops in C. Only the things which are included in the "{}" are looped; it is the very same in LV: Only the things included in the loop-structure are repeated. Everything outside a loop is executed once and then finished.

PLEASE NOTE: LV has a dataflow-paradigm as developement flow. There is one sentence describing this very good:
A Node in LabVIEW is only executed if ALL parameters have valid values, and when a Node is finished, ALL his outputparameters are set with valid values the same time.
You can visualize this by activating the highlightmode (the lightbubble in the iconbar of the blockdiagram) and running your VI.

hope this clears up many things,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 8
(3,247 Views)