取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 8 条)
3,445 次查看
Hello, marten
could you attach your VI?
Thank you.
Michael
0 项奖励
2 条消息(共 8 条)
3,442 次查看
this is it...
0 项奖励
3 条消息(共 8 条)
3,437 次查看
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 项奖励
4 条消息(共 8 条)
3,433 次查看
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 项奖励
5 条消息(共 8 条)
3,431 次查看
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 项奖励
6 条消息(共 8 条)
3,417 次查看
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 项奖励
7 条消息(共 8 条)
3,414 次查看
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 项奖励
8 条消息(共 8 条)
3,410 次查看