Download - LabSocket - A New Web Application Development Tool

Transcript
Page 1: LabSocket -  A New Web Application Development Tool

LabSocketA New Web Application Development Tool

John Bergmans

Bergmans Mechatronics LLC

Remote Presentation to OC Hackerz Meetup Group, Orange County, CA

Apr 3 2014

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

Page 2: LabSocket -  A New Web Application Development Tool

Bergmans Mechatronics LLC

LabVIEW Development Environment• Developed by National Instruments (http://ni.com)• Popular for science and engineering applications

Rocket motor test stand control software created by BML using LabVIEW(Developed for AirLaunch LLC as part of US Air Force/DARPA FALCON program)

Software User Interface Hot Firing

Page 3: LabSocket -  A New Web Application Development Tool

Bergmans Mechatronics LLC

LabVIEW Development Environment• Uses graphical data flow language• Each program or subroutine known as a “Virtual Instrument” or VI

User Interface (“Front Panel”) Interface)

Program Logic (“Block Diagram”)

Page 4: LabSocket -  A New Web Application Development Tool

Bergmans Mechatronics LLC

LabSocket System• Remote viewer client for LabVIEW applications• Browser-based clients, no special client side requirements• Data transmission to/from browser via HTML5 WebSocket

Browser

LabSocket ServerPlatform

HTTP Server

ActiveMQMessage Broker

“Target VI”

LabSocket Support VIs

LabVIEW Host Platform

Browser

Browser

WebSocket Interface

(Over TCP-IP)

TCP-IPSocket

Interface

LabSocket Support VIs

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

Continous Operation- Transmit updates of LabVIEW front panel to browser- Update LabVIEW front panel when user generates events in browser

Page 5: LabSocket -  A New Web Application Development Tool

Bergmans Mechatronics LLC

Demo Configuration

Browser

LabSocket Server

HTTP Server

Message Broker

“Target VI”

LabSocket Support VIs

MacBook Pro

Browser

Browser

WebSocket Interface

(Over TCP-IP)

TCP-IPSocket

Interface

San Jose, CA Huntsville, AL

labsocket.com

Anywhere

Page 6: LabSocket -  A New Web Application Development Tool

Bergmans Mechatronics LLC

Element Test VI

LabVIEW Front Panel Browser Representation

Page 7: LabSocket -  A New Web Application Development Tool

Bergmans Mechatronics LLC

LabSocket-MultiClientLabSocket for Dynamic Web Applications

Page 8: LabSocket -  A New Web Application Development Tool

browser(Target VI 1)

LabVIEW

HTTP Server

ActiveMQMessage Broker

LabSocket Support

VIs

LabVIEW Host PC

Server VI

TargetVI 2

Target VI Prototype (inactive)

Data exchange via Functional

Globals or Queues

browser(Target VI 2)

browser(Target VI n)

… LabSocket ServerVirtual Machine

TargetVI 1

TargetVI n

Bergmans Mechatronics LLC

LabSocket-MultiClient

• Each browser connects to unique instance of Target VI• Each Target VI instance is a copy of an inactive Target VI prototype• LabSocket Support VIs automatically start and stop Target VI instances• Useful for applications in which users need to enter or retrieve user-specific information

Copyright © 2014 Bergmans Mechatronics LLC

• NB: With LabSocket-MultiClient, LabVIEW is now a dynamic web application authoring tool

Page 9: LabSocket -  A New Web Application Development Tool

Bergmans Mechatronics LLC

LabSocket-MultiClient

Copyright © 2014 Bergmans Mechatronics LLC

Target VI Three browsers, each connected to unique instances of Target VI

Same Timestamp Unique Quiz States

Page 10: LabSocket -  A New Web Application Development Tool

Bergmans Mechatronics LLC

LabSocket-MultiClient

Copyright © 2014 Bergmans Mechatronics LLC

“Server VI” Monitoring in the Browser using LabSocket-Basic and LabSocket-MultiCllient

LabSocket-MC Start.viLabSocket Start.vi

Page 11: LabSocket -  A New Web Application Development Tool

Bergmans Mechatronics LLC

LabSocket-MultiClient

Copyright © 2014 Bergmans Mechatronics LLC

Server VI Monitoring in the Browser – Messaging via Queues

Three browsers, each connected to unique instances of Target VI Server VI in Browser

Page 12: LabSocket -  A New Web Application Development Tool

browser(Target VI 1)

LabVIEW

HTTP Server

ActiveMQMessage Broker

LabSocket Support

VIs

LabVIEW Host PC

“Quiz Server” VI

TargetVI 2

Target VI Prototype (inactive)

browser(Target VI 2)

browser(Target VI n)

… LabSocket ServerVirtual Machine

TargetVI 1

TargetVI n

Bergmans Mechatronics LLC

Proposed: Auto Quiz Posting

Copyright © 2014 Bergmans Mechatronics LLC

WebSocketInterface

Development PC

Target VI Target VI automaticallytransmitted to and installed on LabVIEW Host PC

Page 13: LabSocket -  A New Web Application Development Tool

Bergmans Mechatronics LLC

Thoughts

• LabVIEW / LabSocket as a system for rapid developent of dynamic web applications (eg. Web app rapid prototyping)

• Download LabVIEW demo: http://www.ni.com/trylabview/

• Download LabSocket demo: http://labsocket.com/download.html

• LabSocket is an example of an application enabled by HTML5 WebSocket

• What other new type of applications can be enabled by WebSockets?

More Informationw: http://labsocket.comt: @jbergmanse: [email protected]