12-18-2008 11:46 AM
HI,
Every time when main VI calls subvi, those values/setting in subVI which are not connected with mainVI will go back to default values.
How can I let subvi remember those values (which is changed in the last time call) as the setting in the next time call?
Wei
LV7.1
Solved! Go to Solution.
12-18-2008 12:15 PM - edited 12-18-2008 12:15 PM
Here's an idea:
The style used is sometimes referred to as 'Functional Global'.
Ton
12-18-2008 12:29 PM
Maybe I didn't describe my question clearly.
Here is the example (See attachment).
Every time, when I run main.vi, It automaticaly use y=0 (default value) as the y input in Sub.vi.
But, if I run Sub.vi itself only, every time the y use the last time result as this time input. I want to realize this when I use Main.vi to call VI.
Do I have to read the y values in sub.vi to main VI, and then input to SubVI next time when Main.vi call it?
12-18-2008 12:46 PM - edited 12-18-2008 12:47 PM
I understoord your question perfectly, you didnt understood the answer
Here's a new example, where I check both inputs (Numeric and Y) in the subVI:
Ton
12-18-2008 12:51 PM
12-18-2008 12:52 PM
Hi,
did u try global variable?
store Y in a global in Sub VI......read that when u run Sub VI from main VI........
Anil
12-18-2008 01:32 PM
See attachment. There are 2 pair of Main-Sub vi.
They are exatctly same code. Only difference is that they are written in different computer.
Please run to see the difference. Why are they different?
12-18-2008 01:41 PM
12-18-2008 01:54 PM - edited 12-18-2008 02:00 PM
OK, I see. This is what I want to know.
Thanks to everybody answering my question.
Best,
Wei,
12-18-2008 01:58 PM