From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Scripting in LabVIEW Web Services

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

Code and Documents

Attachment

Download All

Description

Overview


LabVIEW Web services allow you to run Embedded Server Pages (ESP) scripts that generate dynamic content, such as an HTML interface, on the LabVIEW Web Server. ESP is a scripting language created by MbedThis and supported by the LabVIEW Web Server. ESP has a similar structure and functionality as Javascript.

Creating ESP Scripts

ESP scripting works with the LabVIEW Web Server architecture. The white paper PDF attached above provides information about how ESP scripting works and how to create ESP scripts. 

 

Using ESP Scripts in a Web Service (Example)

The following example project demonstrates ESP scripts in a LabVIEW Web Service. The labview_esp_demo.zip, attached above, provides a LabVIEW project.

 

Related LabVIEW Web Services Documents on ni.com

Introduction to LabVIEW Web Services
How to get started with server-side Web services in LabVIEW 8.6 or later

LabVIEW Web Services Online FAQ/White Paper
Additional information and answers about the new LabVIEW Web services feature.

LabVIEW Web Services Security
Additional information on securing your Web service.

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