Professional Documents
Culture Documents
Lecture 3
PVSS in Practice
P.C.Burkimsher
IT Division, Controls Group
CERN
1
Introduction
2
Assumptions
• I’m assuming we want to learn how to use a
SCADA product
• I’m assuming you want some hands-on
experience
• Otherwise, re-read the notes from Lec. 2!
– SCADA is going to be used by ALL the LHC
experiment controls groups.
– It will be used across CERN in the other
divisions too (Accelerators, Site services).
– If you are in HEP Controls, you will meet
SCADA.
P.C. Burkims her CERN School of Computing 2001 3
3
Recap
• Name of the
product is PVSS II
4
Basic Functionality
• We’ll cover:
– Human Machine Interface (HMI)
– Data Point (DP) structure definition
– Scripting (Programming)
– Archiving (Data values)
– Trending (Plots of values over time)
– Alarm Handling and Display
• [Access control]
5
The PVSS Console
• PVSS runs on WNT,
W2000 and Linux.
• Even both!
• In the lab here we
have WNT set up for
the tutorial practicals.
• When you start under
WNT, you see the
“Console”.
6
Functions of the Console
7
PVSS S/W Architecture
DM EV Communication and
Memory Layer
D D D Driver Layer
The Data Manager (DM) and the Event manager (EV or EM) start to
run.
Any other tasks you have declared in the console start too.
Your (empty) PrivateProject comes up with a user interface task running
the Graphical Editor called GEDI.
Two versions of GEDI, one on Linux, one on NT. The NT version is
known as Native GEDI (NG).
8
Graphics Editor GEDI/NG
9
The Native GEDI (NG)
10
Panel Animation
• Associated with any graphic element, we
can have scripts.
• Mouse click on a button -> Event -> Script
EventClick runs.
• Script is a little ‘C’ program (more or less).
• Extensions to C, but it is not C++.
• Remember, PVSS not Object Oriented (OO).
– It’s Device Oriented.
• Market, including PVSS, is evolving rapidly.
• Language is called “Ctrl” (say “Control”).
P.C. Burkims her CERN School of Computing 2001 11
11
Panel Script Example
main()
{ // Set a data point element to a value
dpSetWait(“sys1:cryoTemperature.requested.
isOn:_original.._value”, 0);
}
Wizard to generate scripts.
Can edit the script yourself.
Sophisticated library of routines for more complex
processing.
But what is a DP really?
P.C. Burkims her CERN School of Computing 2001 12
12
Basic Functionality
• We’ll cover:
– Human Machine Interface (HMI)
– Data Point (DP) structure definition
– Scripting (Programming)
– Archiving (Data values)
– Trending (Plots of values over time)
– Alarm Handling and Display
• [Access control]
13
Data Points (DPs)
• A DP is a data structure
– Define hierarchies
• Used to hold all info about
a device being controlled.
• PVSS is Device oriented
• No methods (yet). Not OO.
• Structure allows you to
define new instances very
easily. (“One more, just
like that previous one.”)
Data Point
P.C. Burkims her CERN School of Computing 2001 14
14
Parameterization
• Must declare T ype first,
then make an Instance.
• Use the PARA module
(user interface
program).
• Start it from a button in
the Native GEDI (or by
declaring a new task in
the Console.)
PARA s creen
P.C. Burkims her CERN School of Computing 2001 15
15
Original config
• Can see and change current value of the DPE
here.
– Useful for testing and debugging your system offline.
PARA original
config screen
here
16
Basic Functionality
• We’ll cover:
– Human Machine Interface (HMI)
– Data Point (DP) structure definition
– Scripting (Programming)
– Archiving (Data values)
– Trending (Plots of values over time)
– Alarm Handling and Display
• [Access control]
17
Scripts
• Do something when a DPE changes
• T wo cases:
– When “something” is on a panel, e.g. update
the displayed value, or change a colour.
• Very similar to the C-code script behind a button
press.
– When no panels are involved.
18
Script on a Panel
• Connect a call-back routine to the DPE.
• Whenever DPE value changes, your routine gets
called to update the displayed value.
• In the practicals you will use a wizard to generate
such a script.
Routine
void main() {... DPE
status =
dpConnect("displayValue","sys1:cryoTemperature.ac
tual.value:_online.._value");
...}
void displayValue(string dpName,
float changedValue)
{ this.text = changedValue;} // Update display.
P.C. Burkims her CERN School of Computing 2001 19
19
Scripts without a Panel
• You can react on an external event (not an
operator event) i.e. when action script has
nothing to do with a Panel.
– e.g. Call a routine if value reaches a limit
20
Reference Panels
• Practical 2 introduces Reference panels.
• A Ref erence Panel = a parameterized panel.
• All of the scripts behind the panel are
written with $parameters which are then
substituted with Actual parameters
• Substitution can occur
– At development time, when you paste the panel
into your picture or
– At run-time; e.g. Call a function to open a
window that displays a reference panel.
Provide the actual parameters at run-time.
P.C. Burkims her CERN School of Computing 2001 21
21
Basic Functionality
• We’ll cover:
– Human Machine Interface (HMI)
– Data Point (DP) structure definition
– Scripting (Programming)
– Archiving (Data values)
– Trending (Plots of values over time)
– Alarm Handling and Display
• [Access control]
22
Apropos of nothing
23
Basic Functionality
• We’ll cover:
– Human Machine Interface (HMI)
– Data Point (DP) structure definition
– Scripting (Programming)
– Archiving (Data values)
– Trending (Plots of values over time)
– Alarm Handling and Display
• [Access control]
24
Archiving
• PVSS values can be archived (recorded to
disk) for later inspection.
• Add an Archive config to a DPE. Allows
you to specify
– What to record
– When to switch files (e.g. every 24 hours)
• Six pre-def ined Valarch tasks in a new
PVSS project; most common needs.
• Can be suppressed.
25
Basic Functionality
• We’ll cover:
– Human Machine Interface (HMI)
– Data Point (DP) structure definition
– Scripting (Programming)
– Archiving (Data values)
– Trending (Plots of values over time)
– Alarm Handling and Display
• [Access control]
26
Trending - I
• Most common reason values are archived.
• A trend is a Value / T ime plot of a DPEs
value.
• T rends can plot “recent” data that isn’t
recorded on disk. (Lost when you stop the
task.)
• PVSS supplies a trend widget, ready made.
– Multiple curves. Configurable.
– Hairline cursor.
• Value / value plots are also possible.
P.C. Burkims her CERN School of Computing 2001 27
27
Trending - II
28
Basic Functionality
• We’ll cover:
– Human Machine Interface (HMI)
– Data Point (DP) structure definition
– Scripting (Programming)
– Archiving (Data values)
– Trending (Plots of values over time)
– Alarm Handling and Display
• [Access control]
29
Alert Definitions
• PVSS name f or an alarm is an “Alert”.
• Alert definition is a “config” on a DPE.
• N.B. Alert is defined on the instance, not on
the type.
• Alert definition is in 2 parts:
– The conditions under which the alert should be
raised (made active). This is kept in the
“alert_hdl” config.
– Related information in “alert_class” config.
• Priority; Colour; Acknowledgement rules;
• Automatic script execution.
P.C. Burkims her CERN School of Computing 2001 30
alert_class is defined once and shared. For the kind of information that
is the same for many alerts.
30
Alert Display
• PVSS provided Alert Display panel.
• Originally a standard panel
– Now been optimised with C++ inserts.
• If you really wish to implement your own
panel, you can, but this is not
recommended for perf ormance reasons.
31
PVSS Alert Display Panel
32
Properties Subscreen
33
Group Alerts
• Group alert is an additional alert raised at
same time as any alert in a group.
• Usef ul f or summarising situations.
[Group alerts are not covered in the practicals. See the online
documentation for more information.]
34
Basic Functionality
• We’ll cover:
– Human Machine Interface (HMI)
– Data Point (DP) structure definition
– Scripting (Programming)
– Archiving (Data values)
– Trending (Plots of values over time)
– Alarm Handling and Display
• [Access control]
35
The Lab Practicals
• 6 practicals
• 3 hours scheduled.
36
Lab Practicals 1,2,3
• Practical 1: To def ine a simple PVSS
control panel and its associated data point
types and data points.
• Practical 2: To instantiate similar control
panels using a predefined reference panel.
• Practical 3: To demonstrate that a
commonly f ound, but nevertheless
complex, device (a CAEN power supply)
has already been implemented generically.
T o illustrate the ease of use of the JCOP
tools to create new complex instances.
P.C. Burkims her CERN School of Computing 2001 37
37
Lab Practical 4
• Practical 4: To
build a scattered
system with 5 UI
CPUs. DM
UI PC 1 .. PC 4
• Only perform one EM
of Practical 4 or PC 0
UI
Practical 5.
• We use System Example of a sing le PVSS Scatte red
System, b uilt out of tw o or more pro jects,
Manage r
each proj ect o n its o wn mach ine bu t with a
total of one Event Ma nag er/Data Man ager
pair in the en ti re syste m.
in Practical 6.
P.C. Burkims her CERN School of Computing 2001 38
38
Lab Practical 5
• Practical 5 is identical to Practical 4.
39
Lab Practical 6
• Practical 6: To
join the two Distri buted System
Systems DM
produced by EM
Practicals 4 UI
40
Final remarks
• How to access the online help:
– In NG, click “?”
– Also in German. Some useful phrases at the
end of the practical handout!
41
Summary
Subsystems can join and leave, while rest of system runs. (Partitioning,
AWG recommendations)
42
PVSS in Practice
• Any questions?
43
P.C. Burkims her CERN School of Computing 2001 44
44