LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why don't subpanels work in my executable?

I created a subpanel in the main vi and tested it locally. The subpanel opens fine and runs until the main vi is closed.
Once the program is compiled and run on another machine, I get a memory reference error.
Are there any special parameters that need to be changed when deploying an executable with subpanels in it?
Static VI references don't appear to work.
 
0 Kudos
Message 1 of 15
(4,969 Views)
You probably need to make sure that you added all the files to your .exe, including all the subvis and any additional installers if needed.  You might also want to check that you are not referencing a VI to a specific location, say c:\test\my vi and you do not have that folder on the new computer.

Have you tried running the .exe on your computer??  You said it works under labview and then you complied it, then deployed it.  Make sure you do not get the memory error with the .exe on your computer as well.

Post back your results and any other questions.

Kenny
Kenny

0 Kudos
Message 2 of 15
(4,962 Views)

I tried running the .exe on my machine and got a worse error.

I don't even see the VI startup when I try runnning it on my machine.

The VI I'm referencing is on a network drive. Is there another way of referencing the VI without using a static path.

I only need the subpanel to run & update when the parent VI is running anyway.

0 Kudos
Message 3 of 15
(4,942 Views)
Hi MitsuMan,

Since the Subpanel is calling a VI dynamically, you have to follow the same rules as if you were using a dynamic VIs. What you have to do is add the dynamic VI to the Application Builder by using the "Source Files >> Add Dynamic VI..." button. This should make the executable able to link to the dynamic VI wherever it's located.

Have fun - and more of it with LabVIEW 8!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
Message 4 of 15
(4,935 Views)
Thanks for the info. I will try this. I've never used dynamic VI's before.
0 Kudos
Message 5 of 15
(4,922 Views)

Thanks for your suggestion. It seems to fix my memory referencing errror, but it still doesn't fix my ultimate problem.

I can't see the live data in the sub-VI that is running. By referencing the VI on the server, the subpanel only brings back the last static image of that VI. Also I didn't know how to point to a VI in a library programmatically without pulling the VI out of the library.

0 Kudos
Message 6 of 15
(4,916 Views)
Hi MitsuMan,

I verified that the SubPanel works fine even in executables calling VIs from a shared network drive. Please try the attached example (SubPanel.vi) that calls Tester.vi or whatever VI you point at with the "vi path" control. If you don't have LabVIEW 7.1 you can build the VI from looking at the code behind the SubPanel.vi here:



Let me know if it doesn't work, thanks.

Message Edited by Philip C. on 12-21-2005 08:47 PM

- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
Download All
Message 7 of 15
(4,912 Views)

I agree that the subpanel works with a VI on a networked drive, however this is not the issue.

My VI is already in memory in the program and I want to show the active subpanel of the sub-VI that is already acquiring and  modifying data.

I could put controls and indicators on the front panel, but I thought it would be nice if I just used the subpanel, since there were so many indicators on this particular sub-VI.

In other words, if Tester.vi were already in the parent, subpanel.vi, how would you reference it.

I put Tester.vi in subpanel.vi and the subpanel no longer displays Tester.vi.

But, if I simply remove Tester.vi then it works. I also attempted to reference Tester.vi using the string, as if it were already in memory, but this didn' t work either.

0 Kudos
Message 8 of 15
(4,886 Views)
Hi MitsuMan,

Now I think I know what you mean. You want to be able to show an already running VI in the Subpanel window of an executable, right? Well, the reason that you can't do this is because it's not possible! If you point to the Development System by specifying "localhost" (of the executable) to the "Open Application Reference", you can get the reference to the VI if it's already loaded as a VI.

However, when trying to embed the VI into the Subpanel, you will get an error 1147: "Cannot insert a remote VI in a subpanel control." Sorry, but that feature is not supported. Notice that you can still run, stop and everything else that you normally want to do with VI Server - it's just the Subpanel that isn't supported for "remote" VIs.

Useful tips: You ALWAYS point to the opposite execution system when specifying "localhost" so in an executable "localhost" means the Development System - in the Development System "localhost" means the LabVIEW Run-Time Engine of the executable. Here's how I did it in your example:


Message Edited by Philip C. on 12-27-2005 12:30 AM

- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
Message 9 of 15
(4,865 Views)


@Philip C. wrote:

You ALWAYS point to the opposite execution system when specifying "localhost" so in an executable "localhost" means the Development System - in the Development System "localhost" means the LabVIEW Run-Time Engine of the executable.


Really?

I tried it in 7.0 and it seems that the only thing that does determine which application instance you connect to is the port number. Is this not so? This does not appear in the documentation, which is a problem. Can you post an example which shows the Localhost alone opens a connection to the opposite system? And what happens if you have several instances (EXEs)? Especially in 8.0 with the new multiple instances?


___________________
Try to take over the world!
0 Kudos
Message 10 of 15
(4,856 Views)