LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

View Application in Web Browser

I am using LV8 as my programming environment and want to publish my built application (or at least one or two vi's that make up the application) so that other users can view it via their web browser.  Right now I'm testing my application on the same computer that I'm using to view the software, so the client and server are the same computer.
 
I have gone through Tools-->Options to Configure the Web Server, set Browser Access to "*" so that everyone can view the web page, and under Visible VI's I've selected the top-level vi in my project.  I then opened this vi, and accessed Tools-->Web Publishing Tool.  I selected my vi from the pull-down list, and continued to use all of the default values as I went through the setup.  When this was done I built my application.
 
When I was done, I left the main vi open, opened my browser (IE) and directed it to the html document.  It correctly opened my main vi.  I then went to the main vi and ran it, and it showed that it was running in the browser.  That was great.
 
Then I closed the vi (leaving my project open), and the image in my browser went away.  That was what was expected.
 
Next I ran my built application and refreshed my browser.  It still showed my correct "Title", and text "before and after the VI panel image", however the image did not show up and instead I got the error message "Requested VI is not loaded into memory on the server computer".
 
Can anyone give any suggestions on how to fix this?  I've been all over LV help and the NI knowledgebase, but can't figure out what I'm doing wrong.  In the Web Publishing Tool should I be somehow selecting my application instead of the vi?
 
0 Kudos
Message 1 of 9
(4,965 Views)
You need to enable the server in the relevant application (in this case the executable). You can do this by going into the options menu of the EXE or by copying the appropriate INI settings from the labview.ini file.

___________________
Try to take over the world!
Message 2 of 9
(4,951 Views)

Thanks.  I added the line "WebServer.Enabled=True" to my ini file and it worked fine - the first time.  Now when I run it I get the error "The Web Server canoot start.  LabVIEW:  An input parameter is invalid."

I've tried shutting down the web server, shut down LV, rebuilding my application, etc. and nothing seems to get rid of this message.  Do you have any ideas?

0 Kudos
Message 3 of 9
(4,931 Views)

I don't know. I don't have any real experience with remote front panels.

My guess would be that maybe you've changed the settings and you're using an invalid port or maybe one which is already being used (although that should presumably throw another error) or that you've set some other invalid option. The easiest way to check these is to go into the options menu in your executable. I would also suggest that you try searching the site for this error.


___________________
Try to take over the world!
0 Kudos
Message 4 of 9
(4,924 Views)

Steve,

Could you post a simple project with your build spec that is causing the same problem. I have not been able to reproduce the issue, or find any resources talking about this type of an error. Thanks!!

Tyler H.

National Instruments

0 Kudos
Message 5 of 9
(4,917 Views)
Thanks for looking at this.  Attached is a zip file that contains my project, the singe vi in the project, my built application, and its ini file.
0 Kudos
Message 6 of 9
(4,914 Views)
Hello Steve,
everything runs with your application with the following changes to the ini-file on my notebook:
WebServer.Port=8080 (as there is another WebServer already running on my PC)
WebServer.ViAccess="+DeleteMain.vi" (All the other specifications in your file lead to a message "Client does not have access to the specified VI". This should be OK, because you are no longer in LabVIEW and your application should not refer to the LabVIEW project.)
 
With the VI loaded in LabVIEW, I could not find any problems - exactly as you reported.
 
0 Kudos
Message 7 of 9
(4,903 Views)
Thanks for your feedback.  This still confuses me.  Now when I run my application I get the error message "The Web Server cannot start.  LabVIEW: an input parameter is invalid."  Does anyone know where that is coming from?  I'm attaching my ini file.  Thanks!
0 Kudos
Message 8 of 9
(4,868 Views)
Hi, Steve.

I've never encountered that error before, but it sounds to me like you've configured something incorrectly in your INI file. Many of those INI settings can be configured just as easily from the Tools>>Options dialog box -- and I recommend setting them from there (instead of just adding lines to the INI file). Let's temporarily remove your INI file from the LabVIEW directory, restart LabVIEW, and then configure the web server from the Options dialog. (LabVIEW will create a new INI file for you.) After you've done that, I bet the error won't occur. (And then you can just copy the non-web-server-related lines from your INI file into the new one that LabVIEW created.)

Let me know how this works! Have a nice evening.
Sarah K.
Search PME
National Instruments
0 Kudos
Message 9 of 9
(4,847 Views)