0% found this document useful (0 votes)
293 views14 pages

Web Services in LabVIEW

This document provides an in-depth guide to building and deploying LabVIEW web services. It discusses how to design web services in LabVIEW, define web services, send and return parameter and data, and call web services from within LabVIEW and other languages. Challenges discussed include debugging web services and ensuring the correct application instances are connected to.

Uploaded by

huyquy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
293 views14 pages

Web Services in LabVIEW

This document provides an in-depth guide to building and deploying LabVIEW web services. It discusses how to design web services in LabVIEW, define web services, send and return parameter and data, and call web services from within LabVIEW and other languages. Challenges discussed include debugging web services and ensuring the correct application instances are connected to.

Uploaded by

huyquy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

What LabVIEW web services can do for you: An in depth guide to building web services into your applications

and deploying them to your target machines.

Design test automation systems in LabVIEW for last 16 years.


Using LabVIEW since 1993 (version 3.1). EE from MTU. Know some C, C++, C#, JavaScript but prefer LabVIEW. Believe there is nothing you cant do in LabVIEW (if you try hard enough!)

Medical Telecomm Software (using COM interfaces, XML) Network Servers (multiple simultaneous asyncronous DUTs from single TE)

Wikipedia:
a software system designed to

support interoperable machine-to-machine interaction over a network. (http://en.wikipedia.org/wiki/Web_service)

National Instruments:
more open and standard way to communicate with VIs

over the Web.

My Definition:
An API that allows (nearly) any language or tool to

interface with your application.

NI.com Links
Web Services in LabVIEW http://zone.ni.com/devzone/cda/tut/p/id/7350 LabVIEW Web Services FAQ http://zone.ni.com/devzone/cda/tut/p/id/7747 LabVIEW Web Services Security http://zone.ni.com/devzone/cda/tut/p/id/7749

Web Service Build Specification


Builds lvws file

RESTful Web Server


Must be enabled when testing in IDE Must be disabled to build for distribution

Sending Parameters
Must include httpRequestID if returning stream data Pitfalls
Cannot send case sensitive data (converts everything to lower case) Cannot send file paths (must use substitute for /, I like to use ~) Cannot send file names at end of call (browser will think it points to a file)

Returning Data
XML Format

Text Format
HTML Format

Streaming MIME data

Application Instances you must understand:


The Web Service Instance
This is the app instance of the LabVIEW exe that has the web service enabled in its ini file. The NI Web Server Service is on port 3364.

The IDE Instance


Always on port 3363 (unless you changed it). Will block any other app on same port.

Your EXE Instance

Connecting to the right instance


Must Use IP (demo of how to get this programmatically) Must have VI Server Enabled and set to unique port. (Must set this in the EXE ini file)

Recommend using a unique port number.

Cannot use normal methods (queues, notifiers) Calling interface VI with VI Server
VI must be in memory (how to accomplish this) See EXAMPLE - EXE with screenshot enabled.vi VI can push data into a queue. How to use queues to wait for a response (demo)

Calling a web service from LabVIEW


Converting the XML into an Array of Clusters (see call web service.vi for demo)

Calling your web service from HTML


Demo of F5 test system web interface

You can use any web enabled script or language to call your web service (makes your application scriptable)

Building a web service into an application


Build Specification (the order in the project is

important!)
Turn off the Web Server before you build

Custom Files you must include niwebserver.conf (how to create and edit, MIME issue) The www folder (and how to make it appear)

Setting up the Installer

Passing in data (discussed above) Niwebserver.conf file tweaks The build process is a PITA (and very non-intuitive). Seems like distribution was an afterthought. Hope for the future? Double Installation issue Log folder missing

Hard to debug!

C:\Program Files\National Instruments\Shared\LabVIEW Run-Time\8.6\webserver\logs

Must build with diagrams included (Source File Settings) and

Distributed System Manager


Refresh does not work URL path display sometimes works, sometimes not

breakpoints already set.

Where to get it:


http://lavag.org/index.php?app=downloads&showfile=80

What does it do?


Runs as a Windows service (project docs explain

how this is done) Keeps the RESTful web server up and running. (see ini file) Deploys new web services you install automatically Provides some cool utilities!

Test the web server


Echo

Get a screenshot
Remote screen must be rendered (active user)

Get the front panel image of any VI


VI must be in memory

Get the version of any EXE


EXE must be running

Demo using iPod

Create a Universal API Can access any LabVIEW application anywhere in the world Multiple access methods Not simple (yet) to use, but should get better Hard to debug! Only limited by your imagination

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy