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.

LabVIEW Web Development Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Web Services Getting Started Series

Learning to create interactive web pages as part of your LabVIEW application can be daunting. The goal of these examples is to provide bite-sized instruction that builds on itself so you don't get lost in the weeds as you make your journey from n00b to hacker.

 

In addition to these LabVIEW-specific demos, there is a lot of general web knowledge we will learn along the way. If you are feeling brave, skip a couple steps and see if you can figure it out. If you get lost, backtrack until an example you feel comfortable with. If you are still lost, post a discussion question in this group so we can help you!

 

Community members, if you see a gap in the content here, please leave a comment - or better yet - help create a document that fills in that gap and post it to this group!

 

________________________________________

 

1. Introduction to the LabVIEW Web Server

 

What is a web server? What is the LabVIEW Web Server? How does it work under the hood?

 

 

2. Web Building Tutorial

 

If you have never before used HTML or JavaScript, it would be worth your time to quickly go through this example of building a basic web page, parts 1-7. These will introduce HTML, CSS, JavaScript, AJAX, and JSON, which we will use in later examples.

 

 

3. My First LabVIEW Web Service - Adding Two Numbers

 

Tutorial: Creating and Accessing a LabVIEW Web Service

 

A tutorial from the LabVIEW Help. This is the first step to see LabVIEW publish data through a web service to your browser. It won't be glamorous, but you will feel the magic of LabVIEW on the web!

 

 

4. Simple JavaScript & HTML- Adding Two Numbers with Submit Button

 

Simple JavaScript and HTML with LabVIEW Web Services

 

Here we jump from raw XML output to using HTML and JavaScript to provide a user interface on our web page. On the LabVIEW side, this example uses some important changes from the previous example that are described in Web Services - Getting Started.ppt. You can download a completed example at the bottom of the page and follow along, then create the tutorial from a blank project.

 

 

5. Execution Control in JavaScript - Adding Two Numbers with Automatic Page Refreshing

 

Exploring Update Methods with LabVIEW Web Services

 

Clicking the 'Submit' button was such a drag! Can't I write JavaScript that will do that for me? Here we modify the JavaScript code we created in the previous tutorial so that it automatically refreshes every 500 ms. Then we modify it so it automatically updates when our inputs change.

 

 

6. Sending Other Types of Data to the Web - Viewing an Image of your Front Panel

 

Seeing an Image of the Front Panel on the Web

 

We've done some basic tutorials using numbers. What other kinds of data can we send using LabVIEW Web Services? In this tutorial, we get an image of the front panel, and then use LabVIEW Web Services to send the image to the web!

 

________________________________________

 

Next Steps

 

This is a good start - but you have so much more ahead of you in your web development learning journey. Let's learn how to publish data from your system in the Web Services Publishing Data Series.

Joey S.
Senior Product Manager, Software
National Instruments
Comments
meddeb.safouene@gmail.com
Member
Member
on

Hi i am working in project "" recovring data from a data base and later display it in web interface (this interface was not done by labview)

I have succed in the task of recovring data BUT, i dont have any idea how i do the task of displaying this data.

Sans titre.pngFor example i recover the temperature 1, 2 and 3 from the data base and i want to display it in a specific fields in this web interface ( e.g i deploie the value of temperature 1 in front of his specific field )

i want to know if i can do it with web service ? if yes please can you help me with Examples, Documents, Videos ........

if not can you give suggestions how i can do it ?

JoeySpinella
NI Employee (retired)
on

Hi Meddeb,

Please make a new discussion in this group's discussion feature so we can discuss this in more depth.

When you post, can you also post the source code for the web page you are trying to modify (HTML/JS/CSS/PHP)? How is this page currently being hosted? Do you have the ability to modify the web content that is being hosted by your device?

It sounds like you already know how to get the data in LabVIEW, but then the challenge is loading the data on this page.

Best,

Joey

Joey S.
Senior Product Manager, Software
National Instruments
juergen
Member
Member
on

The link does not worh

building a basic web page

error 404

Jürgen