Remote Connectivity with
LabVIEW
What Is Remote Connectivity
• Two machines talking to one another
PC PC
Client
Consumes Data
Server
What Is Remote Connectivity
PC PC
Client Ethernet Server
Network Topology
Mobile PC Internet PC HUB cRIO LAN Instr. FTP Server Bastion Host (i.e. DNS, Email, VPN) Internal Server Internal Firewall External FirewallWhat Is Remote Connectivity
• Two machines talking to one another
PC PC
Client Network Server
PXI/cRIO Industrial PC LAN Instrument
What Is Remote Connectivity
• Two machines talking to one another
PC PC Client Windows/Mac/Linux Web Browser Tablet Smartphone etc. Server PXI/cRIO Industrial PC LAN Instrument Server etc. Network
Many Data Communication Options Exist in LabVIEW
1. TCP and UDP 2. Network Streams 3. Shared Variables 4. DMAs 5. Web Services 6. Peer-to-Peer Streaming 7. Queues 8. Dynamic Events9. Functional Global Variables 10. RT FIFOs
11. Datasocket 12. Local Variables
13. Programmatic Front Panel
Interface
14. Target-scoped FIFOs 15. Notifiers
16. Simple TCP/IP Messaging
17. AMC
18. HTTP 19. FTP
20. Global variables
… just to name a few!
What Is Remote Connectivity
Web Browser PXI Clients Servers Network cRIO Instrument Tablet PCWhat Is Remote Connectivity
Web Browser PXI Clients Servers Network cRIO Instrument Tablet PCIt’s Complicated!!!
Common Scenarios and Solutions
1. Local Monitoring
2. Remote Mobile Access
1. Local Monitoring
Requirements
• Intranet so less security and networking concerns
• Data Communication can be anything
• Windows PC for client, cRIO for server
• Can install applications on PC
• Needs something quick and easy
Possible Solutions:
• Remote Desktop Connection
• LabVIEW Executable
• Web UI Builder
Remote Desktop Connection
Pros
• Built-in or cheap options
Cons
• Normally only one connection at a time
LabVIEW Executable
Pros
• Any data communication architecture
• Shipping examples (i.e. TCP, UDP)
Cons
• Development time
• Application Builder
and Run-Time Engine needed
Web UI Builder
Pros
• Rich UI
• Silverlight required so Windows needed
• No Run-Time needed Cons • Connects to web services • Server configuration needed for executable • $1499 for build license ni.com/uibuilder
Remote Front Panel
Pros
• Easy to create, “check-in” control
• Windows or RT deployment
• After LabVIEW 2011, extra licenses not
needed Cons • LabVIEW Run-Time needed • Proprietary data transfer
2. Remote Mobile Access
Requirements
• Internet so security and networking considerations
• Data communication needs security options
• Data servers need ability to scale
• Monitor and Control
• Simple and easy to develop
Solution Options
• LabVIEW APIs for Mobile
Communication
• Web Services
LabVIEW APIs for Mobile Communication
Notifications from LabVIEW
• Emails using SMTP VIs (Included in LabVIEW Base)
• Text messages using SMTP VIs (Included in LabVIEW
Base)
Web Services
Pros
• Standard HTTP data transfer • Security features • No Run-Time needed Cons • More difficult to program than RFP • Need to develop client interface LabVIEW Application LabVIEW Web Service Web Interface Response Request
Data Dashboard
Pros
• Free
• Uses Shared Variables, Web Services, or
Technical Data Cloud
• Mobile (iOS, Android, Windows)
Cons
• Only iPad can
control and monitor currently
27
ni.com
3. Custom Client Development
Requirements
• Basically the same as Remote Mobile Access scenario
• Want some custom look or functionality • Mobile and PC friendly
• Cheap Solution Options • SCCT • LabSockets • Native App • HTML5
• Smartphone Cross-Platform Communication toolkit made
by T4SM (Tools 4 Smart Minds)
• Library for developing LabVIEW server application and
multiple client options (Android, iOS, Java, HTML5, Linux/Intel, Linux/ARM)
• PUSH data communication
SCCT
Pros
• Cross platform data
protocol
• VIs for security
• Easy-to-use
• No web server needed
• Available on LabVIEW
Tools Network
Cons
• Client UI development • Extra cost ($450)
• Made by Bergmans Mechatronics LLC (labsocket.com)
• Programmatically creates HTML based on VI Front Panel
• Parallel background process keeps browser and VI in sync
(like Remote Front Panels)
• Host HTML on their web server
• Browser based so desktop and mobile friendly
• $595
LabSockets
Pros
• Easy-to-use
• OS and mobile friendly
Cons
• Extra cost
Native app development
Pros • Rich UI • Usability • Access to onboard sensors Cons • Custom Development• App for every OS
HTML development
Pros
• Rich UI
• Cross Platform
Standard, Thin-Client Interface XML Data
VI Deployed as Web Service
Cons • Custom Development • Performance • No device sensors Adobe Flex ni.com/mobilegroup
Summary and Resources
• Networking • Data Communication • Data Clients • Security Resources• ni.com/mobile and ni.com/mobilegroup
• Configuring Software and Hardware Firewalls to Support
National Instruments Products
• Configuring LabVIEW, DSC, and Lookout to Work With
the Windows Firewall