13
LabSocket A 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 rg m an s M ech a tro n ic s L LC

LabSocket - A New Web Application Development Tool

Embed Size (px)

DESCRIPTION

Presentation Summary LabVIEW is a graphical dataflow programming environment from National Instruments Corp. (NI). The relative ease with which complex software can be developed using graphical programming techniques, combined with the hardware devices offered by NI and others, has made LabVIEW a popular programming tool with scientists and engineers for decades. Typical applications for LabVIEW are data acquisition and control systems for manufacturing and laboratory testing. The LabSocket system, developed by Bergmans Mechatronics LLC (BML), enables remote access to LabVIEW applications using desktop or mobile web browsers. The system operates in two stages: First it automatically creates HTML and JS web browser client code; then, the system dynamically synchronizes the LabVIEW user interface with the browser client through an HTML5 WebSocket interface. Just as LabVIEW has enabled non-expert programmers to create sophisticated applications for science and engineering purposes, the combination of LabVIEW and LabSocket could also permit non-expert web developers to readily create dynamic web applications. This presentation provides an overview of the system theory of operation, several existing applications for the system, and live demonstrations.  Additional information about LabSocket is available at http://labsocket.com. The following article provides additional information about the use of the LabSocket system as a web-authoring tool: http://labsocket.com/engineer_crunch_solution.html About John Bergmans Mr. John Bergmans, Principal Engineer and owner of Bergmans Mechatronics LLC since 2003, has developed control and data acquisition systems for rocket and oxy-fuel combustion system test stands, and instrumentation and automatic test equipment applications, typically using LabVIEW.  In addition to the LabSocket system, Mr. Bergmans has also developed a number of browser-based applications that demonstrate the capability of the WebSocket interface, including the collectdVIewer remote server monitoring system: http://collectdviewer.com.   For more information about BML visit: http://bergmans.com.  Contact John at [email protected] or @jbergmans.

Citation preview

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]