labview goes smart(phone) - pie.chpie.ch/cms/fileadmin/documents/labview_goes_smart.pdf · data...

21
LabVIEW Goes Smart(phone) Otto Gansner PI Electronics AG Segelhof 1 CH-5405 Baden-Dättwil Switzerland

Upload: trannguyet

Post on 06-Mar-2018

225 views

Category:

Documents


6 download

TRANSCRIPT

LabVIEW Goes Smart(phone)

Otto Gansner

PI Electronics AG

Segelhof 1

CH-5405 Baden-Dättwil

Switzerland

2 PI Electronics AG

www.pie.ch

Contents

• PI Electronics AG

• Internet of Things

• LabVIEW - Smartphone

• NI Web Service

• PI-Projects

• The Right Choice

• Conclusion

3 PI Electronics AG

www.pie.ch

PI Electronics AG • Baden-Dättwil, ABB Research Center

• NI Alliance partner for 21 years

• Software development

• System integration

• Electronics engineering

• EMC consulting

• Execution of measurements

• Over 600 successful projects

4 PI Electronics AG

www.pie.ch

PI Electronics AG

Hardware Development

Measurement and

Control Devices

Analog

Instrumentation (Signal Conditioning)

Digital

Technology

Image Processing

Data Analysis

Software Development

LabVIEW (RT, FPGA, ….)

Measurement System

5 PI Electronics AG

www.pie.ch

Internet of Things By 2020, more than 26 billion devices will be digitally connected

Gartner Research's Hype Cycle diagram

www.gartner.com

Time

Visibility Peak of Inflated Expectations

Plateau of Productivity

Slope of Enlightenment

Trough of Disillusionment

Technology Trigger

2016

6 PI Electronics AG

www.pie.ch

LabVIEW Goes Smart(phone) ?

Yes, with the help

of NI WEB Service

?

7 PI Electronics AG

www.pie.ch

All Roads Lead to Rome

Data Dashboard

for LabVIEW

NI Cloud Dashboard Service WEB Services

HTML

JavaScript

LabVIEW

SMTP Email

Native App

8 PI Electronics AG

www.pie.ch

NI Web Service

LabVIEW Menu

Project Structure

Measurement

Application

LabVIEW

Web Service

Web

Applications

“POST” - Data

Startup VI : DAQ Process and data calculation

Web Resources : HTTP method VIs

Public Content : Access HTML and Image Files

Private Content : Configuration Files

“GET” - Data

9 PI Electronics AG

www.pie.ch

NI Web Service (Debugging) Activate Debugging

Start Server

Run Web Client Rework LabVIEW Code

Start Request

10 PI Electronics AG

www.pie.ch

NI Web Service (Data Exchange) JSON

{"Description":{"Name":"Test XY",

"Time":3537255372},

"Data":[[1,2,3,4],[5,6,7,8]]}

<Cluster>

<Name>Description</Name>

<NumElts>2</NumElts>

<String>

<Name>Name</Name>

<Val>Test XY</Val>

</String>

<U64>

<Name>Time</Name>

<Val>3537255778</Val>

</U64>

</Cluster>

<Array>

<Name>Data</Name>

<Dimsize>2</Dimsize>

<Dimsize>4</Dimsize>

<I32>

<Name>Numeric</Name>

<Val>1</Val>

</I32>

…………..

XML

[Description]

Name= Test XY

Time=3537255372

[Data]

array11=1

array12=2

array13=3

array14=4

array21=5

………..

LV-Config-File

JSON is well suited

to data-interchange

11 PI Electronics AG

www.pie.ch

Project 1 (Emission Trend Monitoring)

Ring

Buffer

NI WEB

Service HTML

HTML

HTML

12 PI Electronics AG

www.pie.ch

Projekt 1 (Emission Trend Monitoring)

• Trend data will be send as PNG images files

• Only HTTP Method "GET" used for page calling

• User input with HTML <form type = "submit">

13 PI Electronics AG

www.pie.ch

Project 2 (Online Temperature)

NI WEB

Service

Database

HTML 4

JAVA

Script

App

Single-Board

RIO

www.pie.ch

14 PI Electronics AG

www.pie.ch

Project 2 (Online Temperature)

Creating Interactive Webpage

<script type="text/javascript"

src="graph.js"></script>

<!DOCTYPE html PUBLIC "-//W3C//DTD

XHTML 1.0 Strict//EN">

xhttp.open("POST","http://62.202.6.2:503

14/WSCH/TempData", false);

<select id="id_history" name="history">

<option value="1 Day">1 Day</option>

<option value="2 Days">2 Days</option>

Creating Trend with JAVA Script

jquery.js

jqplot.js

highcharts.js

fusioncharts.js jquery.flot.js

morris.js

canvasjs.js

easypiechart.js

sparkline.js

15 PI Electronics AG

www.pie.ch

Project 2 (Online Temperature)

Creating Native

Android Application

Call “PIWEBServer”

url = http://62.202.6.2:50314

Call “PIWEBServer”.Get

Call “PIWEBServer”

url = http://62.202.6.2:50314

Call “PIWEBServer”.Post

Post.Text = 3600

Single Value

Trend Value

Upload App to Google Play

16 PI Electronics AG

www.pie.ch

Project 3 (Position Measurement Device)

NI-FlexRIO

Interface

PI Electronics

Light Source

Sensors

PXI-Controller (Real-Time)

Localhost

Server

Calculation

Main Application

NI WEB

Service

17 PI Electronics AG

www.pie.ch

Project 3 (Position Measurement Device)

[[1,2],[3,4],[5,6]]; 2-D Array Java Script

t = setTimeout(function(){function.graph()}, 500);

xhttp.open("GET", "../Device/data", false);

eval(xhttp.responseText),

Update.graph;

18 PI Electronics AG

www.pie.ch

Project 3 (Position Measurement Device) Setup and System Configuration

<script type="text/javascript“

src="jquery.js"></script>

function formToJSON(Inputs)

{"global":{"setup":“test",

"saveintervall":"1",….

Local Configuration File

Write Global Variables

19 PI Electronics AG

www.pie.ch

Make the Right Choice

HTML4&5

JAVA

Native App

OS: iOS,

Android…. User Input

Trend

Refresh Rate

Web Service

Shared

Variable Dashboard

Security

JSON

SQLite

App Store

Time to

Market

XLM

20 PI Electronics AG

www.pie.ch

Conclusion

Divide and Conquer Niccolò Machiavelli (1469–1527)

NI-DAQ-Device NI-LabVIEW NI-WEB Service User Interface Script

21 PI Electronics AG

www.pie.ch

LabVIEW Goes Smart(phone)

Thank you for your attention

For further information please visit our stand at the

exhibition or go online : www.pie.ch