Presentation is loading. Please wait.

Presentation is loading. Please wait.

WEB SERVICES in LabVIEW María del Campo IFCA-CSIC, Spain October 22, 2009, Garching.

Similar presentations


Presentation on theme: "WEB SERVICES in LabVIEW María del Campo IFCA-CSIC, Spain October 22, 2009, Garching."— Presentation transcript:

1 WEB SERVICES in LabVIEW María del Campo IFCA-CSIC, Spain October 22, 2009, Garching

2  LabVIEW is a graphical programming environment which offers unrivaled hardware integration and advanced analysis and data visualization tools.  Main features:  Easy and quick programming.  Hardware integration.  Advanced analysis.  Multiple targets and OS.  Multiple programming approaches.  Professional User Interfaces.  Multicore programming.  Support and Services. What is LabVIEW?

3 LabVIEW Web Services  Remotely monitor and control LabVIEW applications using custom thin clients, from any Web-enabled device.  Establish machine-to-machine communication using standard HTTP protocols.  Stream any standard MIME data types, such as text, images or videos.

4 LabVIEW Web Services  RESTful architecture, which provides:  Firewall-friendly communication.  Minimal additional markup.  Defined by:  URI  MIME data type  Set of operations supported using HTTP methods

5 LabVIEW Web Services  Protocol: GET, POST, PUT and DELETE HTTP methods.  Data Transfer: Data streaming, server-side scripting (ESP), user session (cookies).  Applications development: HTML, JavaScript, but also Adobe Flex, Flash, AJAX, Microsoft Silverlight, Java applets…

6  Instrument monitoring applications, as.exe files.  Set of LabVIEW web services built and deployed, available through POST and GET HTTP methods. ECOHYDROS APPLICATION: Server side

7  Client side very simple:  Base myREST class implementing basic HTTP operations over a certain WS endpoint.  This class is extended for each kind of sensor/service adding methods for creating and managing specific parameters/responses for each sensor/service.  Standalone Java implementation with no requirements for additional libraries. package myREST; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; ECOHYDROS APPLICATION: Client side

8  Messages interchanged with the Labview WS intended to be syntactically very simple. Proccesing complex messages from LabView side adds unneccesary overload to the VI implementations.  Important to consider the time response of each device, which can result in a timeout error from the server. Easy solution: Tune the value of the HTTP connection ReadTimeOut in java. // Initializes the connection conn = (HttpURLConnection) serverAdd.openConnection(); conn.setRequestMethod("GET"); conn.setDoOutput(true); // Timeout to be set accordingly to the Tribox sampling rate conn.setReadTimeout(100000); conn.connect(); ECOHYDROS APPLICATION: Issues


Download ppt "WEB SERVICES in LabVIEW María del Campo IFCA-CSIC, Spain October 22, 2009, Garching."

Similar presentations


Ads by Google