Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
To download NI software, including the products shown below, visit ni.com/downloads.
This program shows an example of a LabVIEW Web Client communicating to a LabVIEW Web Server to get updates using the GET method.
A web client can exchange data with a remote LabVIEW stand-alone application over a network through LabVIEW Web services for multiple reasons:
In this example we will be using the GET Method to read a dual tone signal with varying frequency and their spectral analysis with multiple windowing techniques from teh Web Server.
The WebServer generates 2 tones with sliding frequency and calculates the spectrum after applying multiple windows. for more information refer to the Signal Generation subVI. The output is then flattened into a Jason String that is written by the server as a response stream. The client Client(Main).vi communicates with this method with its URL (the URL used is on the debugging port to run this example in the development environment) using the HTTP VIs. The received data is then unflattened from Jason to view the cluster of data as sent.
LabVIEW Full or Professional Development Environment 2016 (or later)
To execute this example, follow the below instructions:
To ensure a successful execution, make sure of the below:
The Client Front Panel would look like this:
And below are the VI Snippets of the Client VI, the Web-server Main and SubVIs respectively:
Client:
Signal_Generator (Main) (GET)
Signal Generation SubVI:
Note: You can also use LabVIEW NXG 2.0 and the WebVI feature as a LabVIEW Client. Please refer to the GitHub forum for more information.
To learn more about creating LabVIEW Web Services, please refer to this tutorial: Creating & Accessing a LabVIEW Web Service
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.