04-16-2009 11:59 AM
Hey,
I programmed 2 vi's that run perfect seperately, but I am trying to run the 2nd Vi once the first one ends, I want the first Vi to close out and automatically open + start the next
Solved! Go to Solution.
04-16-2009 12:06 PM
04-16-2009 12:15 PM
04-16-2009 12:16 PM
spole96 wrote:How do I put them on a block diagram?
Have you gone through the tutorials or have at least opened the Help file? To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.
04-16-2009 12:37 PM
I think you may be confused as to what I am asking.
I have 2 completed Vi's that have both front panels and corresponding block diagram's
I want to have at the completion of 1 Vi close itself and call the 2nd Vi and automatically run that Vi
for example I want to double click on Startup.Vi have it run, and at the completion of it close Startup.Vi and automatically open and run Control_Panel.Vi
04-16-2009 12:51 PM
Use VI Server.
Write a reference out of each of your VIs to your "main" block diagram. Then use property nodes to open the front panels and make them visible. Once the VI is done, you can close the reference.
Is this more of what you are looking for? You will have a VI that treats your other two VIs as subVIs, but you will be able to see their front panels while they are running.
04-16-2009 12:58 PM
Chris_VH wrote:Use VI Server.
Write a reference out of each of your VIs to your "main" block diagram. Then use property nodes to open the front panels and make them visible. Once the VI is done, you can close the reference.
Is this more of what you are looking for? You will have a VI that treats your other two VIs as subVIs, but you will be able to see their front panels while they are running.
This is more of what I am looking for, but is there a way to make it automatically close the first Vi when finished?
or would you manually have to close the windows
this may be a little more complicated than I originally hoped
04-16-2009 01:13 PM - edited 04-16-2009 01:13 PM
You can do it programmatically with property nodes and invoke nodes, it would actually be fairly simple for you, no worries on the complications.
I attached a quick image for you (obviously not your complete goal) but you can see the reference, an FP open and an FP close. This will programatically open and close the front panel of THIS VI.
For your case, you will want to reference your subVI to open and close the front panel.
04-17-2009 07:23 PM - edited 04-17-2009 07:25 PM
Thanks for the reply Chris, I'm a little confused as to actually what I'm doing
does this look along the right lines? I didn't put a FP.close for the final VI becuase when the 'OFF' button is pushed it should exit labview
and could someone with labview 8.6 convert this vi down to 8.0?
http://forums.ni.com/ni/attachments/ni/170/400764/1/example.vi
I'm trying to learn from that VI
04-17-2009 07:30 PM
or would something like this be more simple, I would just link the first and 2nd run VI commands and tell the 2nd run command which VI to run?