UEIPAC HMI

21
© 2010 UEI, Inc. All Rights Reserved www.UEIDAQ.com UEIPAC HMI

description

UEIPAC HMI. Overview. The UEIPAC is an embedded Linux based system without any graphical interface. It is very good at network connectivity which makes it possible to create remote graphical user interfaces (also known as HMI Human-Machine-Interface). Client-Server. - PowerPoint PPT Presentation

Transcript of UEIPAC HMI

Page 1: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

UEIPAC HMI

Page 2: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

OverviewThe UEIPAC is an embedded Linux based system

without any graphical interface.

It is very good at network connectivity which makes it possible to create remote graphical user interfaces (also known as HMI Human-Machine-Interface).

Page 3: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

Client-Server• Server typically runs on UEIPAC.

• Example: server acquires data and publishes it for remote display(s)

• One or more client can connect to a server• A HMI client written in C# can display data

acquired on UEIPAC in a chart• A client can subscribe to variable updates

• The client gets notified only when variable value change exceeds a given deadband

Page 4: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

LibSharedData• The shared data protocol is implemented in a

shared library• Linux: libshareddata.so• Windows: UeiSharedData.dll

• Both server and client(s) use the same shared library to communicate.

Page 5: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

UEIPAC

Application #1server

LibSharedData

UEIPAC

Applicationclient

LibSharedData

Application #2client

PC #2

Applicationclient

LibSharedData

PC #1

Web browser

LibSharedData

Page 6: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

LibSharedData 1/2 Implements a simple message based

protocol (set/get variable) using JSON or binary data representation

Local processes communicate over UNIX sockets

Remote processes communicate over TCP/IP sockets

Web browser communicate using Web Sockets

Page 7: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

LibSharedData 2/2Variables are simply designated using a unique

nameVariable type can be a scalar or array of :

Int32 Int16 Int8 Double Float

Page 8: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

Protocol 1/3Client or server sends a request to libshareddata

put_value <name>=<value> put_value_json <name>=<value> get_value <name> get_value_json <name> subscribe_value <name> Etc..

Page 9: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

Protocol 2/3Libshareddata implements a C API that hides the

protocol away

Bindings are available for C#, VB.NET, LabVIEW and Python

Page 10: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

Protocol 3/3Web browsers can directly connect to remote

processes using web sockets and a little bit of javascript programming.

Data can be displayed using standard HTML controls or more advanced HTML5 ones

Page 11: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

UEIPAC server exampleCreate Server:UeiSharedDataCreate("tcp://192.168.100.2:2345", &handle);

Acquire voltages:DqAdv207Read(hd, devn, clsize, cl, NULL, fdata);

Publish voltages:UeiSharedDataPut(handle, “voltages",

UeiSharedDataTypeDbl, clsize, fdata);

Page 12: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

Share Data Client Shared Data client is an application that

provides a quick way to test a server.

Page 13: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

C# clientCreate a client objectUeiSharedDataClient client = new UeiSharedDataClient();

Open communication with serverclient.Open("tcp://192.168.100.2:2345");

Get shared variable valuedouble[] voltages = client.GetDouble(“voltages", 16);

Page 14: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

C# client

Page 15: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

LabVIEW clientCall VIs to open communication with server and

read “voltages” variable values

Page 16: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

LabVIEW client

Page 17: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

HTML5 client Web sockets are part of HTML5. Supported in

the following browsers: Google Chrome (fastest javascript engine) Firefox Safari for MacOS and iOS Android web browser Internet Explorer 10

Page 18: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

HTML5 client There are many HTML5 UI library out there. Most

are business oriented, but are usable for industrial applications

Jquery UI library provides a very easy way to manipulate UI elements of a web page

UEIPAC comes with a default web page to view shared data: http://192.168.100.2:2345/shareddata.html

Page 19: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

HTML5 client

Page 20: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com

SVG lab (still experimental)A set of HTML5 UI controls for web based

scientific and industrial applicationsUses SVG (Scalable Vector Graphics) for

drawing Use javascript for programming.

Chart Slider Maybe more...

Page 21: UEIPAC  HMI

© 2010 UEI, Inc. All Rights Reservedwww.UEIDAQ.com