LabVIEW Web UI Builder and Data Dashboard

cancel
Showing results for 
Search instead for 
Did you mean: 

DataDashboard_demo - Web app. Server

Hello Guys

 

I have a slight problem with this great Web applications Server in Labview. It's a rather specific problem, so please bear with me when I'm explaining.

 

I have watch and done all the tutorials of how to setup shared variable and web service within a project. And I think I now get the point of how to set it up,

though the problem is when I'm accessing the webservice with a client via HTTP URL Method in my internet Browser (chrome) 

through my defined port 8080, I can't operate my VI. 

But when I'm using the local debugging Port 8001, everything is working perfectly.

 

My project that I'm testing on is, one of NI Labviews own demo project, so the project setup should have been done correctly. 

 

I'm following this tutorial (http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/build_web_service/#Deploying_WS) and it's at the end, at the point of

accessing the webservice with a client I get stock.

 

Can anyone explain or have an idea of why I can control my VI through port 8001 via URL HTTP Method, but not with port 8080? 

 

I've attached the project I'm using, and a screen dump of my Web Server Configuration.

 

Further on I can't get the Data Dashboard App. (ipad) to operate my VI either, but I reckon that is because of the "port block" that I'm experiencing. 

So I hope that will solve it self when I get the other thing to work.

 

Bonus info:

Windows 7 

LabView 2013

Windows Firewall is off

 

 

Thank You 

Nikolai

 

Download All
0 Kudos
Message 1 of 12
(8,150 Views)

What happens when you access the URL using port 8080?

 

Here are a few things to check:

  • Is the application web server on port 8080? You can check this by going to Tools->Options in LabVIEW, choosing the Web Server category, then clicking on Configure Web Application Server. That brings you to a UI in the browser, and there is a setting for the port number for the Application Web Server. Make sure that that server is enabled, that its port is 8080, and that the bitness matches the version of LabVIEW you're using.
  • Did you publish your web service? You have to right click on the web service and choose Application Web Server->Publish. That is equivalent to the deployment process from 2012 and earlier. If you don't do that step then the application web server won't know anything about your web service. Alternatively you can create an application (a .exe) using a Build Specification and include your web service with that .exe. Then when you launch the .exe it will run a custom web server (with a custom port) running that web service. That makes it easier to deploy your web service as a standalone utility.
0 Kudos
Message 2 of 12
(8,136 Views)
As you can see on the picture that I have uploadet the port 8080 is defined, and the HTTP is enable.
I have published my project and i Can see it on my Web Server config. Page. Further on i press Start on my
Web server App. Wien i'm "Broadcasting" my project.

So i have tried all this, and this is what that's fustrating me, i can't see what is wrong.
0 Kudos
Message 3 of 12
(8,132 Views)

Hi Svalebaek,

 

When you go to publish your web service to the application web server are you hitting Start or Publish as in the screenshot below?

 

 

publishImage.png

 

KiraT

0 Kudos
Message 4 of 12
(8,125 Views)

Sorry, I didn't see your screenshot. I downloaded your project, published it, and tested it. It worked for me. Here is exactly what I did:

 

  1. Opened the .lvproj.
  2. Right-clicked on WebService1 and chose Application Web Servier->Publish.
  3. Right-clicked on Graph.vi (GET) and chose Show Method URL...
  4. Ensured that 8080 - Application was selected in the drop down and then clicked on Copy URL.
  5. Opened Firefox, pasted the URL into the location bar, and hit enter.

The browser showed me this XML:

<Response><Terminal><Name>Waveform Graph</Name><Value><DimSize>0</DimSize><DimSize>0</DimSize></Value></Terminal></Response>

 That's the same result I get if I used the local debugging server.

 

This is where it's important to know exactly what happens when you try step 5. Does the server not respond? Or do you get a 404? Or some other error? The troubleshooting steps depend on what specific behavior you're encoutering.

 

0 Kudos
Message 5 of 12
(8,122 Views)

I get the same result as you AdamKenp, when I follow your actions step by step.

 

But I'm experiencing my problem when I'm doing the following:

 

  1. Opened the .lvproj.
  2. Right-clicked on WebService1 and chose Application Web Service->Publish.
  3. Right-clicked on Graph.vi (GET) and chose Show Method URL...
  4. Ensured that 8080 - Application was selected in the drop down and then clicked on Copy URL.
  5. Right-clicked on WebService1 and chose Start.
  6. Double-clicked on the Main.vi and execute (Run) the applications such that the sinus wave is generated
  7. Opened Firefox, pasted the URL into the location bar, and hit enter.

The Firefox browser shows me this:

 

<Response><Terminal><Name>Waveform Graph</Name><Value><DimSize>0</DimSize><DimSize>0</DimSize></Value></Terminal></Response>

 But when I do the excact samething, only thing changes is the Port i the URL, to 8001, firefox give me this:

 

<Response><Terminal><Name>Waveform Graph</Name><Value><DimSize>2</DimSize><DimSize>100</DimSize><Name>element</Name><Value>1.365820534045614</Value><Name>element</Name><Value>0.2481263239365297</Value><Name>element</Name><Value>0.3171664875733215</Value><Name>element</Name><Value>0.3195891750275047</Value><Name>element</Name><Value>0.5267863995084453</Value><Name>element</Name><Value>0.2952941658787431</Value><Name>element</Name><Value>0.9358545337460433</Value><Name>element</Name><Value>-0.06701462983182205</Value><Name>element</Name><Value>0.3546753386673981</Value><Name>element</Name><Value>-0.2006001034540738</Value><Name>element</Name><Value>0.09520115020050601</Value><Name>element</Name><Value>0.7084906734780858</Value><Name>element</Name><Value>0.6003776517685027</Value><Name>element</Name><Value>0.4717864538788902</Value><Name>element</Name><Value>-0.01959354175606056</Value>

 

As you can see, when i'm using the Local debugging port, I can read the result from the chart from the main.vi directly in the XML code. Further on I can Stop the main.vi from the stop.vi (GET) URL from my browser when using the 8001 Port, but that I can't do either when using the 8080 Port.

 

I believe you will have to "Start" the broadcast of the project and "Run" the main.vi before you can test if you get the same result as me.

 

 

0 Kudos
Message 6 of 12
(8,114 Views)

Hi Svalebaek,

 

Your Web service is actualy working as expected.  When you Publish a Web service to the Application Web Server, your Web service is going to act as it did in LabVIEW 2012.  When you publish to the application Web server you are moving your Web service to a sepearte application instance than your LabVIEW application.  There for interprocess comminication, like Global Variables, will not work.  

 

There are 2 ways that you can solve this problem:

1.  If you would like a UI and want to have a stand alone Web service, you can build your entire project into an executable and include the Web service.  Your entire exe will operate in one context and therefore will work the way that it does on the debug server

2.  If you would like to publish the Web service to the application web server you will need to replace the global variables with some sort of interprocess communication.  For example, you can use Network Published Shared Variables to achieve your desired behavior. 

 

Let me know if you have any questions about this. 

 

KiraT

0 Kudos
Message 7 of 12
(8,105 Views)

Personally I find the .exe route to be the easiest. You already have a build spec configured properly. Just build and run that, and then use the port number you configured there (8002). Then you get the data you expect. In that case you're getting data from the UI in your .exe.

 

Trying to make a web service published to the application web server communicate with a VI running in a regular LabVIEW instance is tedious and makes your application confusing and hard to debug. One of the big advantages of LabVIEW 2013 Web Services is that you don't have to do that anymore (you can just use an .exe).

0 Kudos
Message 8 of 12
(8,101 Views)
That sounds great, I will try that tomorrow. Do you have a good idea of where to start, when making a .exe?
0 Kudos
Message 9 of 12
(8,097 Views)

This help topic explains how to go about including a Web service into an exe using Application Builder.

0 Kudos
Message 10 of 12
(8,094 Views)