extending labview to the web using the labsocket system
Post on 18-Jan-2015
1.312 Views
Preview:
DESCRIPTION
TRANSCRIPT
Extending LabVIEWto the Web Using the
LabSocket System
John Bergmans, CLD
Bergmans Mechatronics LLC
Bay Area LabVIEW User Group Meeting
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.comNewport Beach, CA 92660 @jbergmans
Bergmans Mechatronics LLC
Current Approaches to Remote LabVIEW Access1.Native Client App
• Use TCP/IP sockets, LabVIEW shared variables, or .NET, to transmit data between client and LabVIEW
• Requires custom client development and modifications to LabVIEW app
2.LabVIEW Remote Panels• Requires LabVIEW Run-Time Engine (RTE) and browser plug-in on client platform
3.LabVIEW Web Services• Data transferred between application and client using the HTTP request-
response model (REpresentative State Transfer (REST) architecture)• Requires development of client software using Web languages
eg. HTML/JavaScript
4.LabVIEW Web UI Builder (http://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
Bergmans Mechatronics LLC
LabSocket System
Browser
LabSocket ServerPlatform
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
Continous Operation- Transmit updates of LabVIEW front panel to browser- Update LabVIEW front panel when user generates events in browser
TCP-IPSocket
Interface
Bergmans Mechatronics LLC
Other Configurations
Browser
LabSocket ServerPlatform (VM)
HTTP Server
Message Broker
“Target VI”
LabSocket Support VIs
LabVIEW Host Platform
Browser
Browser
WebSocket Interface
(Over TCP-IP)
TCP-IPSocket
Interface
Browser
LabSocket ServerPlatform (VM)
HTTP Server
Message Broker
“Target VI”
LabSocket Support VIs
LabVIEW Host Platform
Browser
Browser
WebSocket Interface
(Over TCP-IP)
TCP-IPSocket
Interface
PC on LAN
Bergmans Mechatronics LLC
Demo Configuration
Browser
LabSocket ServerPlatform
HTTP Server
Message Broker
“Target VI”
LabSocket Support VIs
MacBook Pro
Browser
Browser
WebSocket Interface
(Over TCP-IP)
TCP-IPSocket
Interface
Server in San Jose, CA
Amazon EC2 Instancein Northern VA
Bergmans Mechatronics LLC
Graphing
LabVIEW Front Panel Browser Representation
Bergmans Mechatronics LLC
MultiColumn ListBoxes
LabVIEW Front Panel Browser Representation
Bergmans Mechatronics LLC
LabSocket Start VITools Palette Context Help
Bergmans Mechatronics LLC
Authentication• Authentication=T forces users to enter credentials • User authentication managed by ActiveMQ message broker
Bergmans Mechatronics LLC
Moodle Integration
LabVIEW Front Panel LabSocket iframe in Moodle Lesson
• Option for integration with MOODLE Course Management System - https://moodle.org/
• application_type = moodle_integration places web page in moodle file structure
Bergmans Mechatronics LLC
Remote Cascade Lab - KTH Royal Institute of Technology (Sweden)
GUI Main View Live Traverse Results
• Objective: to perform tests on turbine airfoils• LabVIEW software used to control test rig• LabSocket system enables lab testing 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
Additional information at: http://www.energy.kth.se/proj/projects/Remote_labs/RL/RL_website/RCL/RCL.html
Bergmans Mechatronics LLC
SportJury – First Commercial LabSocket Application
iPod touch browser screenshots
Swiss Snow Happening judges entering score data on iPod touch devices
Data aggregated on central PC
• Distributed, multi-user application for judging ski competitions• Used successfully at 2011 Swiss Snow Happening in Saas-Fee, Switzerland• Developed by Dynasys, D. Kölliker (Neuenegg, Switzerland) www.dynasys.ch
Bergmans Mechatronics LLC
“Multi-Pack” Systems for TEMPUS Program• TEMPUS: EU Program for modernization of higher education programs in Eastern
Europe, Central Asia, Western Balkans and Mediterranean - http://eacea.ec.europa.eu/tempus/
• “Multi-Pack” systems (eg. “Twin-Pack”, “Five-Pack”, etc) to be delivered as complete sets to TEMPUS partner university labs
• Integration with MOODLE Course Management System - https://moodle.org/
Bergmans Mechatronics LLC
LabSocket-RTLabSocket for LabVIEW Real-Time
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-IPSocket
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” Copymanually 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 applications on LabVIEW Real-Time platforms
• Support for reduced set of Front Panel elements• Possible use case: RT application monitoring /
debugging
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
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
Bergmans Mechatronics LLC
LabSocket-RT
Chrome Browser on Mac
Chrome Browser on iPhone
Demo1.vi Front Panel (Idle)
Screenshots
Bergmans Mechatronics LLC
Closing Notes
• Coming soon: LabSocket on LabVIEW Tools Network
• Possible framework for custom or more complex applications
• Consider: LabVIEW / LabSocket as dynamic web authoring system (NoFlo alternative)
• What other applications can be enabled by WebSockets?
Bergmans Mechatronics LLC
ContactJohn BergmansBergmans Mechatronics LLC
phone: 714-474-8956e-mail: jbergmans@bergmans.comweb: bergmans.comtwitter: @jbergmans
More Information and Downloadable Demoslabsocket.com
Bergmans Mechatronics LLC
Extra Slides
Bergmans Mechatronics LLC
LabSocket Details
• Dynamically replicates LabVIEW front panel element values and properties such as color, visibility, disabled state, etc.
• Compatible with desktop and mobile browsers that have native WebSocket support (including Safari browser in iPhone, iPod touch and iPad). Option available for browsers without WebSocket support.
• Two possible architectures• Basic – one LabVIEW front panel replicated in one or more browsers• Multi-Client – multiple unique copies of a LabVIEW VI each connect to one or
more browsers
• Two platforms for LabSocket Server• Customer Server (LAN or cloud)• LabSocket Cloud
• Additional information and downloadable evaluation system at www.labsocket.com
Bergmans Mechatronics LLC
Element Test VI
LabVIEW Front Panel Browser Representation
Bergmans Mechatronics LLC
Waveform Charts
LabVIEW Front Panel Browser Representation
Bergmans Mechatronics LLC
Waveform Graphs
LabVIEW Front Panel Browser Representation
top related