Smartphones, Tablets, and Mobile Devices Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Server Name/ IP Address for Data Dashboard

Thanks,

Seems to be a problem here. Gets invalid hostname when trying to connect to the listed URL.

I see that the web service is published based on the Web Server listing. I assume that the default IP 127.0.0.1 (localhost) can be used.    

To check that it's not a network problem I have used the third party software Wezarp (evaluation version), and this is working nicely on my IPAD showing the data from the same vi.

Not an expert on this stuff so appreciate any good advice.

Skjermbilde.JPG

Skjermbilde1.JPG

0 Kudos
Message 11 of 15
(1,413 Views)

The address shown in your screenshot is for the Debug Web Server. The Application Web Server, which hosts the services listed in the web interface (your second screenshot) usually runs on port 8080. You can confirm this port in the Web Server Configuration tab of the web interface, in the Application Web Server section.

The two methods of running a LabVIEW web service (Debug and Deploy) are described in this Help document. Mainly, Start will put the web service on the Debug server and Publish will put the web service on the App Web Server.

Zach P.

Staff Software Engineer | LabVIEW R&D | National Instruments
0 Kudos
Message 12 of 15
(1,413 Views)

Also, 127.0.0.1 is a special IP address that always means "this machine" (whichever machine you're running on). If you try to use that IP from Data Dashboard then it will try to connect back to th iPad, which is obviously not what you want. You need the PC's real IP address.

0 Kudos
Message 13 of 15
(1,413 Views)

Here is what I get using the default URL;  http://127.0.0.1:8080/WebService_kt/Graph

Not sure if I should expect more numbers here sice the main vi publishing the graph is running.

Same result when changing the IP and browsing from another pc on the network.

Skjermbilde2.JPG

Skjermbilde3.JPG

Skjermbilde4.JPG

0 Kudos
Message 14 of 15
(1,413 Views)

There are two different contexts involved here: your editor context, which has the VI window that you are looking at, and the application web server. Your VI is running in the editor, but it's not running in the application web server context. Since you used global variables those are also scoped to the current context, which means when the web service runs in the application web server's context it will get the values of the variables in that context, instead of the ones in your editor context. That is, they're separate variables, which is why you see an empty array.

One approach to fixing this is to use shared variables instead of globals to communicate between the two contexts. That's the easiest thing to do, but isn't as easy to deploy to other machines if that's important.

Another approach is to make your Main VI be a "Startup VI" (by moving it into the "Startup VIs" folder in the web service). That will cause this VI to run when the web service is deployed. The tricky part is that when that VI is run it won't have a UI. You will have to rely on the web services to know what is going on.

Another approach, which I like, is building this into a new application (using an Application Build Specification). You can configure the application build specification to enable the web service when it is run, which will actually start up a new web server (at a port specified in the build spec) for this web service. With this approach you can take that .exe and deploy it to some other machine (along with an installer if needed), and wherever it is run it will carry its web service with it. And the best part is that you still get your UI at the same time.

0 Kudos
Message 15 of 15
(1,413 Views)