LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating an executable that calls sub VIs

Solved!
Go to solution

I have "A.vi" that is used solely to select and call up "B.vi" and "C.vi"  (B and C call upon no subVIs)

I want to create an executable that opens up "A.vi" and is able to call up either "B.vi" or "C.vi" when selected. 

At the moment, I can only create an executable of "A.vi" and it doesn't call up the other VIs.  How do I fix this?

Thanks!

0 Kudos
Message 1 of 12
(3,982 Views)

Are you trying to achieve this by using a button? If you use an event structure and the property node front panel call you can achieve this. However I would need more information on what you are trying to use to achieve this.

0 Kudos
Message 2 of 12
(3,959 Views)

Please post some sample code so we can help.

 In the meantime another common mistake you could check for is calling an absolute path to a VI when using the "open vi reference".  In development mode, the path to the vi is usually

 

<application directory>\subvi.vi

 in a built executable the path is

 <application directory>\executable.exe\subvi.vi

 

But that is just a guess based on very little information...

0 Kudos
Message 3 of 12
(3,954 Views)

I am using a case structure with a string selector.  I close the inside loop with an "ok" button when the user has selected "A" or "B"
Inside the case structure runs the selected subVI.

0 Kudos
Message 4 of 12
(3,942 Views)

Please don't post pictures of code -- post the VI so we can really see it, poke around in it, edit it, execute it (and see error messages), etc.

 

You build an Executable using a LabVIEW Project.  If your VIs A, B, and C are all in the Project, and you build an Executable with A as the Start-up VI, A, B, and C will all be in the Executable and it will work exactly the same way it does when you execute A from the Development System.

 

Bob Schor

0 Kudos
Message 5 of 12
(3,930 Views)

OK for now, I'm going to ignore everything that is wrong with what you just posted... and focus on answering your question.  That having been said, I strongly recommend you go online and do some reading.  A google search for "LabVIEW Basics" will return a ton of results.

 

Now to answer your question:

What is exactly is the problem with building this?  Have you tried it?  I see nothing in what you posted that should interfere with a built application.

0 Kudos
Message 6 of 12
(3,926 Views)
Solution
Accepted by topic author nlis12

My stuff is set up a little different but you can use the property nodes to call and close call on a sub vi's front panel.

Message 7 of 12
(3,924 Views)

This is basically what my code is.
Case structure to choose which which subVI to open.

I dumbed it down because A and B utilize cDAQ devices and will error if you don't have the devices.

0 Kudos
Message 8 of 12
(3,903 Views)

No problem building an executable, it just doesn't call up the subVIs when running as an executable.

But in developer mode, it works fine.

0 Kudos
Message 9 of 12
(3,899 Views)
Solution
Accepted by topic author nlis12

I had no problem building and running an exe from that zip source.  OK the two boolean stop buttons may not work exactly how you want them to work and you shuld close the FP of the top level when the exe stops but, the exe builds and runs

 

You should put the source in a project (*.lvproj) but the build tool does that for you anyhow.

 

Let us see a screen shot of your build spec preview


"Should be" isn't "Is" -Jay
Message 10 of 12
(3,894 Views)