next up previous contents index
Next: Installation Up: ProcessViewBrowser Previous: ProcessViewBrowser   Contents   Index

Introduction

First of all excuse my english. It's not my native language. This may become a printed booklet. Meanwhile it is a draft version.

In process visualization, HMI and Scada you have to observe and control a lot of signals measured in the real world and signals that have been calculated. These signals are changing over time. Your visualization must be dynamic. It may include text and graphics. For feeding the real world signals in and out the computer you need appropriate interfaces (data aqusition systems, field busses, PLC's ...).

pvbrowser is an OpenSource attempt to this problem. The idea behind is to have something like an internet browser which can display dynamic content. Normally an internet browser displays almost static HTML pages. pvbrowser will display dynamic changing Qt widgets. What is displayed within the pvbrowser window and how interaction is done will be defined by the server program. This can be compared to an internet browser. Both connect to a server via TCP/IP by inputting a URL. What is displayed within the window is defined by the server. The server(s) may be changed at any time. The clients will automatically see the actual content.

pvbrowser uses ASCII text commands that are terminated by a NEWLINE. The server will send such commands to the browser. The browser will interpret these commands and execute them.

In the reverse direction the browser will also send ASCII commands. E.g. when a button is hit. Thus events are implemented.

Figure 1.1: The server sends ASCII commands to the browser
telnet localhost 5050
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '\^]'.
setText(0)
pvsdemo
resize(0,1280,1024)
startDefinition(3)
QLabel(1,0)
setGeometry(1,150,20,130,60)
setText(1)
this is a textLabel
QPushButton(2,0)
setGeometry(2,10,20,121,51)
setText(2)
A Button
endDefinition()
setText(1)
val = 0
setText(1)
val = 1
setText(1)
val = 2
setText(1)
val = 3

Figure 1.2: This is what you see in the browser
Image prinzip

The command \fbox{setText(0)} \fbox{pvsdemo} sets the text for object 0 to "pvsdemo". This is the text in the titlebar of the browser. \fbox{resize(0,1280,1024)} will set the geometry of your work area. \fbox{startDefinition(3)} tells the browser that a new mask will be defined containing 3 objects. The browser will allocate an array for holding 3 objects. The old mask will be destroyed. \fbox{QLabel(1,0)} will construct a new QLabel, \fbox{setGeometry(1,150,20,130,60)} will set the geometry of the label and \fbox{setText(1)} will set \fbox{this is a textLabel} as text. \fbox{QPushButton(2,0)} will construct a QPushButton, \fbox{setGeometry(2,10,20,121,51)} will set it's geometry and \fbox{setText(2)} will set \fbox{A Button} as text. \fbox{endDefinition()} tells the browser that the definition of mask is finished and that the mask can be shown. The following commands set a text on object 1 in the mask.

The task of the user will be to write the server program. The layout of the masks can be defined in Qt Designer. Qt Designer stores the layout in an XML file (name.ui). This file can be converted to sourcecode using the converter ui2pvc. You get a running skeleton of your server in which you can insert your logic.


next up previous contents index
Next: Installation Up: ProcessViewBrowser Previous: ProcessViewBrowser   Contents   Index
Rainer Lehrig 2004-02-17