Example Code

Communicating with a LabVIEW Web Service using a LabVIEW NXG Web Module WebVI Client

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW
  • LabVIEW NXG
  • LabVIEW NXG Web Module

    Operating System

  • Windows

    Programming Language

  • LabVIEW G

Code and Documents

Attachment

Description

I created a very simple WebVI that acts as a client to the LabVIEW Weather Monitoring Web Service Example included with an install of LabVIEW. This example uses an HTTP call to request data from the Web Service example. I created the WebVI using LabVIEW NXG Web Module 5.0

 

In the process of figuring out how to interact with the Web Service example, I used this great tutorial Creating and Publishing a LabVIEW Web Service to the Application Web Server.

 

 

 

 

 

How to Use

  • Open up, configure, and run the LabVIEW Weather Monitor Web Service example in LabVIEW 20XX
    • I hosted everything on the NI Web Server. Ensure your Port used is the same open port setup during the NI Web Server Configuration
  • Open the "Weather Monitor Client" WebVI in LabVIEW NXG 5.0. You will also need the LabVIEW NXG Web Module installed.
    • Ensure the IP and Port information match those in your Weather Monitor Web Service.
    • Run the Weather Monitor Server VI
    • Run the Weather Monitor Client WebVI

 

 

 

 

 

Related Links

 

 

 

 

Daniel Parrott
Software Product Marketing - Data Management & LabVIEW
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Slavko_24
Member
Member
on

Thanks a lot, it's really helpful during the first steps!