Hosting a LabVIEW Web Service and an NXG Web VI in a Remote System

Updated Jul 4, 2018

Reported In

Software

  • LabVIEW NXG Web Module
  • LabVIEW
  • LabVIEW NXG
  • LabVIEW NXG 2.1 Web Module

Issue Details

It is now possible to use the LabVIEW NXG Web Module to create WebVIs and access applications from any web browser and connect them with a LabVIEW Web Service. You can follow this tutorial in order to test the functionality and understand how to interconnect both environments. In case you do not have LabVIEW or LabVIEW NXG installed in your host target when deploying, this is what you can do:

Solution

There are two main approaches to follow:

1. Deploy the LabVIEW Web Service through and installer or application (as mentioned in this link Publishing a Web Service (Real-Time, Windows) - LabVIEW 2017 Help - National Instruments ). Then, deploy the WebVI in an NIPKG that includes the NI Web Server. To include the NI Web Server in the package, you can click the plus sign under dependencies, and search for NI Web Server. 



When following this method, you will need to use an absolute URL to specify the path to the web service. (Modify the WebVI to include the path in the relative path case).



Also, make sure the port you are trying to access has been configured in the NI Web Server Configuration as well. Follow the path syntaxis that is explain in the tutorial: localhost:<port for the NI Web Server>/<path to the Web VI>, where path to the Web VI is the path that starts from the htdocs folder.

2. Deploy the WebVI with the Web Service in an installer, in order to do so, in the LabVIEW Project, right click the Web Service and select Add Public Content Folder. Then, Select the folder where your WebVI build is located.



When following this method, you can use the relative URL mentioned on the tutorial and, the syntaxis of the address looks as following: localhost:<port>/<Web Service Name>/<Web VI name.html>

WAS THIS ARTICLE HELPFUL?

Not Helpful