+ All Categories
Home > Documents > Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Date post: 19-Jan-2016
Category:
Upload: izabela-horvath
View: 7 times
Download: 0 times
Share this document with a friend
Description:
Labview Labsocket presentation
Popular Tags:
25
Extending LabVIEW to the Web Using the LabSocket System John Bergmans, CLD Bergmans Mechatronics LLC Bay Area LabVIEW User Group MeeDng Santa Clara, CA Nov 19, 2013 Bergmans Mechatronics LLC 1616 Bedford Lane, Unit A bergmans.com Newport Beach, CA 92660 @jbergmans
Transcript
Page 1: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Extending  LabVIEW  to  the  Web  Using  the    LabSocket  System  

           

John  Bergmans,  CLD  

Bergmans  Mechatronics  LLC    

 Bay  Area  LabVIEW  User  Group  MeeDng  

Santa  Clara,  CA  Nov  19,  2013  

B e r g m a n s M e c h a t r o n i c s L L C

1616  Bedford  Lane,  Unit  A  bergmans.com  Newport  Beach,  CA  92660  @jbergmans  

Page 2: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

Current  Approaches  to  Remote  LabVIEW  Access  1.  Na%ve  Client  App  

•  Use  TCP/IP  sockets,  LabVIEW  shared  variables,  or  .NET,  to  transmit  data  between  client  and  LabVIEW  

•  Requires  custom  client  development  and  modificaDons  to  LabVIEW  app  

2.  LabVIEW  Remote  Panels  •  Requires  LabVIEW  Run-­‐Time  Engine  (RTE)  and  browser  plug-­‐in  on  client  pla]orm  

3.  LabVIEW  Web  Services  •  Data  transferred  between  applicaDon  and  client  using  the  HTTP  request-­‐response  model  (REpresentaDve  State  Transfer  (REST)  architecture)  

•  Requires  development  of  client  so_ware  using  Web  languages  eg.  HTML/JavaScript  

4.  LabVIEW  Web  UI  Builder  (hGp://www.ni.com/uibuilder/)  •  Build  and  run  apps  in  browser  using  reduced-­‐capabiliy  LabVIEW  •  Requires  Silverlight  plug-­‐in  (runs  on  Windows  and  Mac  OS  X)  

5.  Data  Dashboard  for  LabVIEW  •  Requires  development  of  user  interface  and  linking  UI  to  block  diagram  •  Limited  to  iOS,  Android,  Windows  8  and  Windows  Phone  devices    

Page 3: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

LabSocket  System  

Browser

LabSocket Server Platform

HTTP Server

Message Broker

“Target VI”

LabSocket Support VIs

LabVIEW Host Platform

Browser

Browser

WebSocket Interface

(Over TCP-IP)

HTML5 WebSockets enable automatic replication of LabVIEW front panel in a browser without plug-ins

LabSocket  Support  VIs    

Startup  -­‐  LabVIEW  Front  Panel  screenscrape,  send  HTML  and  JavaScript  code  to  HTTP  server  

Con+nous  Opera+on  -­‐  Transmit  updates  of  LabVIEW  front  panel  to  browser  -­‐  Update  LabVIEW  front  panel  when  user  generates  events  in  browser  

TCP-IP Socket

Interface

Page 4: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

Other  ConfiguraDons  

Browser

LabSocket Server Platform (VM)

HTTP Server

Message Broker

“Target VI”

LabSocket Support VIs

LabVIEW Host Platform

Browser

Browser

WebSocket Interface

(Over TCP-IP)

TCP-IP Socket

Interface

Browser

LabSocket Server Platform (VM)

HTTP Server

Message Broker

“Target VI”

LabSocket Support VIs

LabVIEW Host Platform

Browser

Browser

WebSocket Interface

(Over TCP-IP)

TCP-IP Socket

Interface

PC on LAN

Page 5: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

Demo  ConfiguraDon  

Browser

LabSocket Server Platform

HTTP Server

Message Broker

“Target VI”

LabSocket Support VIs

MacBook Pro

Browser

Browser

WebSocket Interface

(Over TCP-IP)

TCP-IP Socket

Interface

Server in San Jose, CA

Amazon EC2 Instance in Northern VA

Page 6: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

Graphing  

LabVIEW  Front  Panel   Browser  RepresentaDon  

Page 7: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

MulDColumn  ListBoxes  

LabVIEW  Front  Panel   Browser  RepresentaDon  

Page 8: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

LabSocket  Start  VI  Tools  Palede   Context  Help  

Page 9: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

AuthenDcaDon  •  Authen'ca'on=T  forces  users  to  enter  credenDals    •  User  authenDcaDon  managed  by  AcDveMQ  message  broker    

Page 10: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

Moodle  IntegraDon  

LabVIEW  Front  Panel   LabSocket  iframe  in  Moodle  Lesson  

•  OpDon  for  integraDon  with  MOODLE  Course  Management  System  -­‐  hdps://moodle.org/  

•  applica'on_type  =  moodle_integra'on  places  web  page  in  moodle  file  structure  

Page 11: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

Remote  Cascade  Lab    -­‐  KTH  Royal  InsDtute  of  Technology  (Sweden)  

GUI  Main  View   Live  Traverse  Results  

•  ObjecDve:  to  perform  tests  on  turbine  airfoils  •  LabVIEW  so_ware  used  to  control  test  rig  •  LabSocket  system  enables  lab  tesDng  to  be  performed  

remotely  using  browser  •  Remote  control  of  rig  aided  by  use  of  web  cam  •  70  students  have  operated  rig  remotely  with  LabSocket  

system  to  date  (60  in  groups  of  3-­‐6  and  10  individually)  •  Lab  part  of  EU  funded  Virtual  Campus  Hub  project  

AddiDonal  informaDon  at:  hdp://www.energy.kth.se/proj/projects/Remote_labs/RL/RL_website/RCL/RCL.html  

Page 12: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

SportJury  –  First  Commercial  LabSocket  ApplicaDon      

!iPod  touch  browser  screenshots  

Swiss  Snow  Happening  judges  entering  score  data  on  iPod  touch  devices  

Data  aggregated  on  central  PC  

•  Distributed,  mulD-­‐user  applicaDon  for  judging  ski  compeDDons  •  Used  successfully  at  2011  Swiss  Snow  Happening  in  Saas-­‐Fee,  Switzerland  •  Developed  by  Dynasys,  D.  Kölliker  (Neuenegg,  Switzerland)  www.dynasys.ch  

Page 13: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

browser

HTTP Server and Message

Broker

One or More Desktop or Mobile Devices on public

Internet (Lab 1)

LabVIEW Host PC (192.168.1.101)

LabVIEW

Target VI 1 LabSocket Support VIs

ELVIS

LabSocket Server PC (XX.XX.XX.02)

Lab 1

browser

One or More Desktop or Mobile Devices on public

Internet (Lab 2)

browser

One or More Desktop or Mobile Devices on public

Internet (Lab 5)

LabVIEW Host PC (192.168.1.102)

LabVIEW

Target VI 2 LabSocket Support VIs

ELVIS

Lab 2

LabVIEW Host PC (192.168.1.105)

LabVIEW

Target VI n LabSocket Support VIs

ELVIS

Lab 5 ! !

Lab 1 Data

Lab 2 Data

Lab 5 Data

HTTP Server

MOODLE Server PC (XX.XX.XX.01)

“MulD-­‐Pack”  Systems  for  TEMPUS  Program  •  TEMPUS:  EU  Program  for  modernizaDon  of  higher  educaDon  programs  in  Eastern  Europe,  Central  Asia,  Western  Balkans  and  Mediterranean  -­‐    hdp://eacea.ec.europa.eu/tempus/  

•  “MulD-­‐Pack”  systems  (eg.  “Twin-­‐Pack”,  “Five-­‐Pack”,  etc)  to  be  delivered  as  complete  sets  to  TEMPUS  partner  university  labs  

•  IntegraDon  with  MOODLE  Course  Management  System  -­‐  hdps://moodle.org/  

Page 14: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

LabSocket-­‐RT  LabSocket  for  LabVIEW  Real-­‐Time  

Page 15: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

LabSocket-­‐RT  

HTTP Server

Message Broker

“Target VI” Copy

LabSocket Support VIs

LabVIEW RT Host Platform

Browser

WebSocket Interface

(Over TCP-IP)

TCP-IP Socket

Interface

Block Diagram Interface VIs

“Target VI”

LabSocket-RT Converter

LabVIEW Development PC

“Target VI” Copy

Block Diagram Interface VIs

Step 1 LabSocket-RT Converter copies HTML and JS to HTTP Server

Step 3 “Target VI” Copy manually deployed to RT Host

VM or Physical Server

Step 2 LabSocket-RT Converter inserts Block Diagram Interface

VIs into “Target VI” copy

•  Special  version  for  access  to  applicaDons  on  LabVIEW  Real-­‐Time  pla]orms  

•  Support  for  reduced  set  of  Front  Panel  elements  •  Possible  use  case:  RT  applicaDon  monitoring  /  

debugging  

Page 16: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

LabSocket-­‐RT  •  Converter  replaces  front  panel  elements  in  block  diagram  with  “Block  

Diagram  Interface  VIs”  

Demo1.vi     Demo1_RT.vi    

Block  Diagram  Interface  VIs  

Page 17: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

LabSocket-­‐RT  •  LabSocket  RT  Converter  modifies  copy  of  Target  VI  block  diagram  •  Start  Converter  from  Tools  >  LabSocket  RT  >  LabSocket  RT  Converter  …  •  Target  copy  manually  added  to  project,  included  in  build,  and  deloyed  to  RT  plaform    

LabSocket  RT  Converter    

LabVIEW  RT  Project  

Page 18: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

LabSocket-­‐RT  

Chrome  Browser  on  Mac  

Chrome  Browser  on  iPhone  

Demo1.vi  Front  Panel  (Idle)  

Screenshots  

Page 19: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

Closing  Notes  

•  Coming  soon:  LabSocket  on  LabVIEW  Tools  Network  

•  Possible  framework  for  custom  or  more  complex  applicaDons    •  Consider:  LabVIEW  /  LabSocket  as  dynamic  web  authoring  system  (NoFlo  alternaDve)    •  What  other  applicaDons  can  be  enabled  by  WebSockets?  

Page 20: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

Contact  John  Bergmans  Bergmans  Mechatronics  LLC    phone:  714-­‐474-­‐8956  e-­‐mail:  [email protected]  web:  bergmans.com  twider:  @jbergmans  

More  InformaDon  and  Downloadable  Demos  labsocket.com  

Page 21: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

Extra  Slides  

Page 22: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

LabSocket  Details  

•  Dynamically  replicates  LabVIEW  front  panel  element  values  and  properDes  such  as  color,  visibility,  disabled  state,  etc.  

•  CompaDble  with  desktop  and  mobile  browsers  that  have  naDve  WebSocket  support  (including  Safari  browser  in  iPhone,  iPod  touch  and  iPad).    OpDon  available  for  browsers  without  WebSocket  support.  

 •  Two  possible  architectures  

•  Basic  –  one  LabVIEW  front  panel  replicated  in  one  or  more  browsers  •  MulD-­‐Client  –  mulDple  unique  copies  of  a  LabVIEW  VI  each  connect  to  one  or  

more  browsers  

•  Two  pla]orms  for  LabSocket  Server  •  Customer  Server  (LAN  or  cloud)  •  LabSocket  Cloud  

•  AddiDonal  informaDon  and  downloadable  evaluaDon  system  at  www.labsocket.com  

Page 23: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

Element  Test  VI  

LabVIEW  Front  Panel   Browser  RepresentaDon  

Page 24: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

Waveform  Charts  

LabVIEW  Front  Panel   Browser  RepresentaDon  

Page 25: Extending LabVIEW to the Web Using the LabSocket System (Bay Area LV UGM Nov 19 2013)

Bergmans  Mechatronics  LLC  

Waveform  Graphs  

LabVIEW  Front  Panel   Browser  RepresentaDon  


Recommended