LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

nested subpanels via references

Hi I am building a simple program to verify the working  before building it further.
I am using Labview 7.1. pls see the attached.
In it, there is a main vi called subpanel that is supposed to run first
Also there are 2 container.vis that are responsible for running subpanels
Container.vi opens subpanel to reveal login.vi and container1.vi opens subpanel to reveal 3 functions
I am connecting the all vis by means of control references.
 
Here's how the sequence works;
subpanel > container > login > container1 > choose one of three functions > back to login
 
The problem is that the error is "the object reference is invalid"
And how do I make xxx.done and cancel buttons work?
Would appreciate your help to help fix the bug.
Clement
Message 1 of 7
(3,442 Views)
Hi astroboy,

I get missing auto_error.vi

Felix
0 Kudos
Message 2 of 7
(3,425 Views)
Hi Astroboy,

Yes, as mentioned above auto_error.vi is missing in login.vi which makes it un-executable. Is this also your case or did you forget to include the vi in the Zip file you posted?
Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 3 of 7
(3,399 Views)

Hi  Felix and Elis,

Sorry. I forgot to add.

Here it is. Thanks alot.

Download All
0 Kudos
Message 4 of 7
(3,388 Views)
Hi astroboy,

The call by reference is not correctly used. You need to open the VI with a reference and then wire the opened VI to the call by reference node.

In addition I have several concerns about your code (considering it a quick draft):
* You insert the vi into the subpanel inside the while loop, but remove it outside.
* The order of calling the VI (thus setting the control values) and running the VI (thus reading the control values in the vi) is wrong (but the error still occured when I changed it).
* You should place the references in shift registers. If you have a for loop that iterates 0 times, the reference will become invalid otherwise.

Felix


0 Kudos
Message 5 of 7
(3,376 Views)
Hi,

here is a working VI. You don't need the RunVI at all.
As a sidenote, you can register for the stop button in the login.vi as an user event.

Felix
0 Kudos
Message 6 of 7
(3,375 Views)

Thanks Will look into it and get back to you.

Clement

0 Kudos
Message 7 of 7
(3,352 Views)