Learning Remote Control Framework ADD-ON for LabVIEW



Similar documents
Live Maps. for System Center Operations Manager 2007 R2 v Installation Guide

Installation Guide. Live Maps 7.4 for System Center 2012

ni.com Remote Connectivity with LabVIEW

Enrollment Process for Android Devices

Getting started with 2c8 plugin for Microsoft Sharepoint Server 2010

Hands-On: Introduction to Object-Oriented Programming in LabVIEW

educ Office Remove & create new Outlook profile

Installation Process

Using the Push Notifications Extension Part 1: Certificates and Setup

LabVIEW Internet Toolkit User Guide

Installing and Configuring Microsoft Dynamics Outlook Plugin to Use with ipipeline MS CRM

ReadyNAS Remote. User Manual. June East Plumeria Drive San Jose, CA USA

Getting Started with the LabVIEW Mobile Module Version 2009

EMR Link Server Interface Installation

Generate Android App

Customer Tips. Configuring Color Access on the WorkCentre 7328/7335/7345 using Windows Active Directory. for the user. Overview

MERLIN SERVER. The Quick Start Guide for collaborative project management ProjectWizards GmbH, Melle, Germany. All rights reserved.

Remote Connectivity to XV, XP and epro units running Visual Designer

How To Use A Citrix Netscaler Thin Client V (Windows) With A Citirix Vpn Desktop (Windows 10) With An Ipad Or Ipad (Windows 8) With Vpn

Fax User Guide 07/31/2014 USER GUIDE

Management, Logging and Troubleshooting

WINDOWS 7 & HOMEGROUP

FileMaker 11. ODBC and JDBC Guide

QuickCRM Mobile. Mobile Access to SugarCRM. User Manual. Version: 2.6


NovaBACKUP xsp Version 15.0 Upgrade Guide

Alliance istock Mobile Trading. User Guide for Apple iphone & Android Devices

Remote Desktop Services

FileMaker 12. ODBC and JDBC Guide

Soft Solutions, Inc. 4-Sight FAX 7.5. Getting Started. Soft Solutions, Inc.

Configuration Manual

Getting Started with VMware Horizon View (Remote Desktop Access)

How to Setup and Connect to an FTP Server Using FileZilla. Part I: Setting up the server

NEC CLOUD STORAGE. Demo Guide

Throughout this document, you will be instructed to log in as user Ann, or as user Julia. Log in using the user name assigned to you.

Migration User Guides: The Console Application Setup Guide

Network Monitoring with SNMP

Abila Nonprofit Online. Connection Guide

Security. The user and group account information for LookoutDirect 4 is kept in the Lookout.sec file, installed in your Windows SYSTEM directory.

F-Secure Messaging Security Gateway. Deployment Guide

Distance-Learning Remote Laboratories using LabVIEW

EZ RMC Remote HMI App Application Guide for ios

SMS for Outlook. Installation, Configuration and Usage Guide

Installation Guidelines (MySQL database & Archivists Toolkit client)

BuzzTouch ios Push Notifications

Guest Quick Guide PC and Mac Users Updated to version March 2015

Client Training Manual

Installation and Setup Guide

NAS 272 Using Your NAS as a Syslog Server

How To Install An Aneka Cloud On A Windows 7 Computer (For Free)

Enterprise Manager. Version 6.2. Installation Guide

Immotec Systems, Inc. SQL Server 2005 Installation Document

STATISTICA VERSION 12 STATISTICA ENTERPRISE SMALL BUSINESS INSTALLATION INSTRUCTIONS

VPN: Virtual Private Network Setup Instructions

Sophos Mobile Control Installation guide. Product version: 3

Magnet Voice Windows PC Softphone Installation

NAS 242 Using AiMaster on Your Mobile Devices

Remote Service Manager Installation & Configuration Guide

The same as the Bold convention (see above) but with the intent of providing a greater emphasis.

MaaS360 Mobile Enterprise Gateway

IBM Aspera Add-in for Microsoft Outlook 1.3.2

1 Outlook Web Access. 1.1 Outlook Web Access (OWA) Foundation IT Written approximately Dec 2010

Remote Desktop Solution, (RDS), replacing CITRIX Home Access

Sophos Mobile Control Installation guide. Product version: 3.5

Sophos Mobile Control Installation guide

MaaS360 Mobile Enterprise Gateway

GREEN HOUSE DATA. Services Guide. Built right. Just for you. greenhousedata.com. Green House Data 340 Progress Circle Cheyenne, WY 82007

Mobile Iron User Guide

SSH Secure Client (Telnet & SFTP) Installing & Using SSH Secure Shell for Windows Operation Systems

Quick Deployment Step-by-step instructions to deploy Oracle Big Data Lite Virtual Machine

GE Intelligent Platforms. Activating Licenses Online Using a Local License Server

Colligo Manager 5.1. User Guide

for Android Desktop and Conduit for Mac Quick Start Guide

ThinPoint Quick Start Guide

Guide for Setting Up Your Multi-Factor Authentication Account and Using Multi-Factor Authentication. Mobile App Activation

MelbourneOnline Hosted Exchange Setup

Installation Notes for Outpost Network Security (ONS) version 3.2

Appium mobile test automation

Xerox 700 Digital Color Press with Integrated Fiery Color Server. Printing from Mac OS

FTP Service Reference

There are a variety of ways to read ebooks from the Stirling Libraries and Archives ebooks Collection.

Setting up a networked printer on a local PC

Wakanda Studio Features

FieldIT Limited FieldIT CRM. Installation Manual v1.3.i3 (Enterprise Install)

for Networks Installation Guide for the application on the server August 2014 (GUIDE 2) Lucid Exact Version 1.7-N and later

for Networks Installation Guide for the application on the server July 2014 (GUIDE 2) Lucid Rapid Version 6.05-N and later

Computer Science and Engineering MacOS Cisco VPN Client Installation and Setup Guide

Personal Cloud. Support Guide for Mobile Apple Devices

Technology Services Group Procedures. IH Anywhere guide. 0 P a g e

Personal Cloud. Support Guide for Mac Computers. Storing and sharing your content 2

Initial DUO 2 Factor Setup, Install, Login and Verification

Getting Started with the LabVIEW Mobile Module

How do I Install and Configure MS Remote Desktop for the Haas Terminal Server on my Mac?

Administration Guide for the System Center Cloud Services Process Pack

Administrator s Guide for NETZSCH Remote Access

Apps for Android. Apps for iphone & ipad INS584-3

Kaspersky Lab Mobile Device Management Deployment Guide

Access the GV-IP Camera through a broadband modem

Transcription:

Learning Remote Control Framework ADD-ON for LabVIEW TOOLS for SMART MINDS Abstract This document introduces the RCF (Remote Control Framework) ADD-ON for LabVIEW. Purpose of this article and the documents that will follow, is introducing developers to the use of RCF to create their own remote controls to manage LabVIEW based systems. In this document the following points are covered: creating a Remote Control (RC), creating commands, adding parameters to a command, implementing LabVIEW code associated to a command. Keywords RCF, LabVIEW, remote control, client server, OOP with LabVIEW, design pattern with LabVIEW Document type TUTORIAL 1

Learning Remote Control Framework ADD-ON for LabVIEW Introduction The purpose of this document is help LabVIEW developers to integrate RCF in their own applications. RCF is a powerful ADD-ON for LabVIEW that creates a system interface of a LabVIEW based system, similar to a remote control, on different platforms such iphone, Android phones, web browsers. LabVIEW programs play the role of servers while RCF clients act as clients. In the follow I use the term server to refer to the LabVIEW program and the term client to refer to an RCF client. Requirements RCF ADD-ON for LabVIEW is based on SCCT primitives. SCCT is a communication library available for different programming languages and platforms. SCCT for LabVIEW rel. 2.5.x is required. LabVIEW development system 2010 or higher (32 bit or 64 bit) SCCT (Smartphone & Cross-platform Communication Toolkit) Remote Control Framework ADD-ON for LabVIEW SCCT (Smartphone & Cross-platform Communication Toolkit) Refer to Resource paragraph at the end of this document to find useful link and download evaluation copies. Overview RCF publishes the interface of your system to clients, when they successfully connect to the server. Authentication and all communication details are managed by RCF and SCCT so you don t have to. The interface you define for your system, is named CATALOG. A Catalog is a collection of Remote Controls devoted to different users or activities. For complex systems you can define multiple remote controls each with multiple commands, while simple systems generally have only one remote control. Every Remote Control is composed by a list of commands which extend the basic Command class, provided by RCF. A command is associated to one or many buttons of your remote control. Every command can includes some parameters that user has to fill before firing the command. Firing a command means sending to server a request with some parameters. Simplest command has no parameters. Reserved commands can be associated to a password so that only authorized users can use them. Commands (i.e. user requests) can return one or more results to user. In this case RCF is responsible to gather information and format them properly before returning them to the user. Clients are in charge to display properly results according to their definition specified at server side. Available result types are: Text Table Chart Histogram Piechart X-Y Chart 2

Tutorial TOOLS for SMART MINDS 2013 The following UML diagram explains the relation between classes. Catalog Remote Control Command Parameter 1..N Has (many) Is a My first command My second command My third command Catalog can be changed at runtime. When a catalog is update, RCF notifies to clients the new catalog, with more or less commands. Catalogs can be created programmatically with LabVIEW code or can be loaded from disk. How RCF interacts with LabVIEW main app Apart from basic applications without loops, generally a LabVIEW based system has one or main loops devoted to different tasks: acquiring, controlling, processing, etc. RCF interacts with them passing user requests if it cannot manages the request by itself. Command results have to be retrieved by one of the loops in the main application, for instance the acquired signal values. Interaction, i.e. data exchange among RCF and loops can be implemented in your favorite method: queues, notifiers, Global variables, etc. LabVIEW application, with one or more loops devoted to different tasks. RCF creates a background loop with manages users requests and all communication details. Adding RCF to a LabVIEW program The following Example illustrates how RCF is added to an existing LabVIEW program. Notice that when The main loop ends, you need to notify to RCF that its loop has to terminate otherwise LabVIEW program never stops. 3

Learning Remote Control Framework ADD-ON for LabVIEW RCF needs only three elements to work: TCP port where it has to listen to incoming connections, password to authenticate users a catalog to create remote control(s) The above example includes stopmanager.vi that stops RCF background task. STEP 1 - Creating a simple remote control In the following, we create a simple remote control composed by 5 commands. Follow the tutorial step by to create your own LabVIEW code or download the example at the following link: Specifications We create a Remote Control to manage some simple operation on server disk. Command title Get Free disk space Create Folder Get file List Command description Returns the FREE disk space in MB Creates a subfolder in folder where LabVIEW program is saved Returns a table that describes files or folders available in folder where LabVIEW program is saved First of all, we choose a title for our Remote Control and a brief description displayed on clients as RC help. Below, is shown the code to add a RC to a catalog. RC title is Disk management, RC layout is Remote control. RC can be displayed with different layouts by clients. Most popular layout is Remote Control so we use that in this example. The function build array is required because write RemoteControlList.vi requires an array of RCs as input parameter. 4

Tutorial TOOLS for SMART MINDS 2013 Creating the first command Since RCF is based on OOP programming, you need to create specific classes for your commands. To add create a Class, choose New form LabVIEW file menu and select Class in the left side of the window: LabVIEW asks the name of the new class, type CmdGetFreeDiskSpace, as indicated below. Take care to create a subfolder named CmdGetFreeDiskSpace into your project folder. This is necessary because multiple classes implement the same method so many Vis require the same file name. At this point you have to link your new class with a Command class included into RCF. Right click on class name in project window and select the last menu item Properties as indicated below: 5

Learning Remote Control Framework ADD-ON for LabVIEW Class property window allows to edit many features of your LabVIEW class. To change its inheritance, select Inheritance form left panel and press Change Inheritance button in the right side 6

Tutorial TOOLS for SMART MINDS 2013 From left list. Select Command.lvclass and press Inherit from selected button. RCF includes Command class to this purpose, use always this class to create your own commands. Close Class property window with Ok button and return to project window. Right click of your class in project window and select New >> Vi for Override item. This allow to override abstract methods defined in ancestor class. 7

Learning Remote Control Framework ADD-ON for LabVIEW In New Override window, Select first row * execute. LabVIEW places an asterisk at the left of abstract methods that required to be implemented in concrete classes. The only method you have to override i You can create all methods and properties you need to implement your command. Save created VI into class folder with execute.vi name. Do not override other class methods otherwise RCF won t be able to run your command properly. RCF uses execute method in response to user requests, so remember to implement always this method. By default, LabVIEW placed a call to ancestor method. As indicated in the following figure: You need to substitute that code with your own LabVIEW code. For this method we place the following code, to return the free disk space to user. 8

Tutorial TOOLS for SMART MINDS 2013 The code returns a message with the free disk space, in MB. Every command returns a result object. RCF allows different types of result. You can find result classes and methods in RCF palette. Do not change these classes otherwise RCF clients become unstable and can crash. In this example, a TextResult object is returned to the client. Creating the second command Add a new class name CmdCreateFolder to your project, change its inheritance and override execute method, as done for the first command. The project window will result as follow: On disk you have the following structure: This command creates a new folder with name indicated by user. This command contains a single parameter we call Folder. Parametric commands display a form created at runtime on client interface and users fill the form BEFORE send the request to RCF. In this execute method, we use Read filedvalues.vi to retrieve the field values typed by user. We know that this command has only one parameter so we take the first element of fieldvalues array. Fields are always 9

Learning Remote Control Framework ADD-ON for LabVIEW returned as string values, regardless of their type. The suggested code checks is folder exists, then creates it. This command returns a TextResult object as we did for the first command. Note: How can we create command that do not return results? If your command doesn t need to return result, simply do not connect result indicator. Creating the third command Add a new class name CmdGetFileList to your project, change its inheritance and override execute method, as done for the previous commands. The project window will result as follow: On disk you have the following structure: This command requires two parameters: Folder name List type that indicates the subfolder to be analyzed. If this name is not specified, command uses default folder A listbox with three values: Files only Folders only Files and Folders 10

Tutorial TOOLS for SMART MINDS 2013 The code of execute method is illustrated in figure below: This execute.vi uses two subvis to list file and folder attributes. These Vis are part of command class and saved in class folder. This command returns a table result to user. Table is fully described by a four elements cluster. Read fieldvalues returns two values: the first is the folder name while the second one is the list type. 11

Learning Remote Control Framework ADD-ON for LabVIEW Composing the remote control With the three commands created above, we compose a remote control. Use three times quickcreate.vi, to create three commands with all their parameters. Notice that: Commands in RC are displayed in the same order you add them in your array of command objects. Every command requires a title, displayed on command buttons of client interface Every command requires a TAG: a unique string used by RCF to identify user requests. A TAG can be any nonempty string. 12

Tutorial TOOLS for SMART MINDS 2013 Since commands CreateFolder and GetFileList require user input, we add fields to those commands as indicated in figure below: Before starting the server, we add some useful details: welcome message and help URL. Adding a welcome message It s important to welcome users when they successfully connect to the system. Connect a string message to welcomemessage connector of RCF manager, as indicated in the following figure: 13

Learning Remote Control Framework ADD-ON for LabVIEW Adding a help URL When users connect to a complex system, like automatic machine or similar, it s important providing a detailed help of that system enriched with images and technical details: RCF allows associating a URL to every catalog. Clients display a specific info button linked to help URL. To do so, connect helpurl with the proper page address, as indicated in figure below: Some clients require prefix http:// to properly open the web page: always add http:// to help URL. When designing Execute.vi pay attention to the following points: Execute.vi has to be executed in short time, Inside an execute.vi, never requests user interaction at server side (such messagebox, alerts, etc.) never include never-ending loops. Remember that multiple users can be connected at the same time and request the same command. Debugging your application One of the main advantages of RCF over web services, is the easiness of debugging your LabVIEW code. When you run a RCF client and request the execution of analyzed VI, you can take full advantage of LabVIEW debugging tools such probes and breakpoints. 14

Tutorial TOOLS for SMART MINDS 2013 Testing your RCF Now it s time to run your first RCF. Take note of IP address of your PC and connect your smartphone to that PC. Clients for Android and iphone/ipad allow to save connection info on their local disk so you don t need to type credentials every time. The following screenshots have been taken form RCF client for ios. 15

Learning Remote Control Framework ADD-ON for LabVIEW Resources RCF clients are available for the following platforms: RCF ADD-ON for LabVIEW is available for evaluation at http://www.toolsforsmartminds.com/products/remote_control_for_labview.php For Android devices, visit Google Play at https://play.google.com/store/apps/details?id=scct.console For iphone/ipad devices, visit Apple store at https://itunes.apple.com/en/app/remote-control-for-labview/id595313230?mt=8&ign-mpt=uo%3d4 For HTML5 compliant browsers, at http://www.toolsforsmartminds.com/remote_control_html5/ For Windows based systems, a FREE RCF client is available at http://www.toolsforsmartminds.com/products/remote_control_for_labview.php This client has some limitation to the number of commands and parameters you can add to a remote control. This client has been created to help developers to test their LabVIEW based systems and learn how to create simple remote controls. SCCT is available at http://www.toolsforsmartminds.com/products/labview_communication_library.php LabVIEW and related National Instruments products (such device drivers and other ADD-ONs) are available at www.ni.com 16