WebVIs: Securely Share User Interfaces with LabVIEW NXG


In this video, you will learn how to build and deploy a WebVI to run in a browser. You will also see how to host a WebVI on the NI Web Server. 

Software Requirements

This video references code that you can use to follow along. To run this example code, you will need LabVIEW NXG 2.0 or later and the LabVIEW NXG Web Module. You can download the required installers and code from the links below.


Concepts Covered in this Video

  • Building a Web Application—Build a web application using the GCOMP document in LabVIEW NXG.
  • How to create multiple top-level WebVIs—Create multiple top-level WebVIs by selecting them in the GCOMP document. This will result in a distinct HTML file and URL for each top-level VI. Visit GitHub for more examples showing how to create multiple web pages from multiple top-level WebVIs.
  • Running the Web Application in any modern browser—Run the web application in any modern browser by right-clicking on the web application in SystemDesigner and choosing “Run”. This starts a compilation of the application and runs it in a browser when complete.
  • Permanently hosting on the NI Web Server—Copy the entire build output of the project, located in the Builds directory of the LabVIEW NXG project on disk, and paste it in the htdocts directory at C:\Program Files\National Instruments\Shared\Web Server\htdocs . Open a web browser and navigate to http://localhost:80/WebApp_Web%20Server/index.html . The port number and specific naming of the URL may change based on the NI Web Server settings and title of the project. Follow this same procedure for hosting the web application on any third-party web server.