LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Use VI as a SUB VI which contains Shift Register, property node and custom control"

I have created a VI (Start_Stop.vi), which contains the shift Registers,a while loop, property node and one Custom control.
 
I want to use it as a sub VI, if i am using it as a standlone VI, It is working Well, but not as sub Vi.
 
Please review.
 
 
0 Kudos
Message 1 of 11
(3,471 Views)
You didn't say what the problem running it as a subVI is, so I am making some guesses here.

  1. I see no reason for this to be reentrant, so I turned it off.
  2. You had not changed the window appearance of the VI, so it doesn't display the front panel when called as a subVI.  I made the following changes to the VI Properties in the Window Appearance section, and pressing the Customize button:


I attached the modified VI.  If this didn't fix your issue, please be more specific to the problem.


Message Edited by Matthew Kelton on 12-30-2007 06:46 AM
0 Kudos
Message 2 of 11
(3,463 Views)

Thanks, but i want to say that when i call this sub vi into another vi, when i press the start button, it cannot change the output to high, but if i run this vi as a standalone then if i press the  start button, it will change my output to High.

 

So if i call it into a new VI, it must work the same way it was working as standalone.

 

 

0 Kudos
Message 3 of 11
(3,442 Views)
Did you make the changes that Matthew indicated? If you do, you will find the VI works either standalone or as a subVI. Why did you think you needed the VI to be reentrant? Are you trying to use this same VI to control multiple motors simultaneously?
0 Kudos
Message 4 of 11
(3,426 Views)
I just re-ran the VI after the changes I made and the output boolean turns on when I press the start button whether the VI is called as a main VI or a subVI.
0 Kudos
Message 5 of 11
(3,422 Views)

Ok, Idea is working fine and through it  i learned.

 

When i call this sub VI into a new VI and press the run botton on the parent VI , It opens my Sub Vi (Child)and it works.

 

Now i have Two Pumps, I want to either Start/Stop these Pumps from the Main VI or from the Sub VI.

 

0 Kudos
Message 6 of 11
(3,393 Views)
Sorry i forget to attach new ZIP File, Please open the Main VI and run it, It will not start/Stop the pump from here.
 
I want to run both bumps from Main VI by pressing the Start/Stop buttons.
0 Kudos
Message 7 of 11
(3,391 Views)
In that case, you do want the VIs to be reentrant.  Turn it back on and it will work the way you want.
0 Kudos
Message 8 of 11
(3,385 Views)
yes, i know that if i run the VI in Re-Entrant Mode, it will open the New Instance of VI each time we call, e.g if i call this Vi three times it will open three different instances of same vi.
 
My problem is that if i call this Sub VI into my Main VI.
 
Please run the Main VI.
 
1. If i press the Start Button, It remain High
2. It does not change the Output to High when i press the Start Button.
 
Please Re-Run the Main VI and you will be able to answer my question easily.
 
*Attached is a new ZIP file.
 
 
0 Kudos
Message 9 of 11
(3,356 Views)
Thanks a lot for being with me.
 
Now i successfully created a VI which can call other sub Vis and These Sub VIs are working Fine.
 
Please re-check the work and reply.
0 Kudos
Message 10 of 11
(3,350 Views)