+ All Categories
Home > Documents > Distributed Control Systems Lecture 3 PVSS In

Distributed Control Systems Lecture 3 PVSS In

Date post: 08-Nov-2014
Category:
Upload: shesharam-chouhan
View: 36 times
Download: 3 times
Share this document with a friend
Description:
Lecture 3 PVSS In
Popular Tags:
44
1 P.C. Burkim sh er CE RN Sch ool of Computi n g 2 001 Distrib uted Cont rol Sys te ms Lec ture 3 PV SS in Practice P.C.Burkimshe r IT Division, Co ntrols Group CERN
Transcript
Page 1: Distributed Control Systems Lecture 3 PVSS In

1

P.C. Burkimsh er CERN Sch ool of Computin g 2001

Distributed Control Systems

Lecture 3PVSS in Practice

P.C.BurkimsherIT Division, Controls Group

CERN

Page 2: Distributed Control Systems Lecture 3 PVSS In

2

2P.C. Burkimsher CERN School of Computing 2001

Introduction

• Aim of this lecture:– Introduce you to the SCADA system chosen by

the LHC experiments.– Teach you enough concepts to enable you to

perform the tutorial practical exercisessuccessfully.

– Give you enough background so that you canbe confident to get started with PVSS yourself.

Page 3: Distributed Control Systems Lecture 3 PVSS In

3

3P.C. Burkimsher CERN School of Computing 2001

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 LHCexperiment controls groups.

– It will be used across CERN in the otherdivisions too (Accelerators, Site services).

– If you are in HEP Controls, you will meetSCADA.

Page 4: Distributed Control Systems Lecture 3 PVSS In

4

4P.C. Burkimsher CERN School of Computing 2001

Recap

• The SCADA toolchosen for LHCexperiments is fromAustrian CompanyETM

• Name of theproduct is PVSS II

Page 5: Distributed Control Systems Lecture 3 PVSS In

5

5P.C. Burkimsher CERN School of Computing 2001

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]

• How does PVSS present this functionality?

The key components of a SCADA system as outlined in the lecture ofW.Salter.

Page 6: Distributed Control Systems Lecture 3 PVSS In

6

6P.C. Burkimsher CERN School of Computing 2001

The PVSS Console

• PVSS runs on WNT,W2000 and Linux.

• Even both!• In the lab here we

have WNT set up forthe tutorial practicals.

• When you start underWNT, you see the“Console”.

Page 7: Distributed Control Systems Lecture 3 PVSS In

7

7P.C. Burkimsher CERN School of Computing 2001

Functions of the Console

Allows you to choose which PVSS project you wish to run

Lists the tasks/processes of your PVSS project. User definable.

Allows you to stop/start them

Altogether as a system

Individually

Allows you to specify parameters to the tasks

For example,

“Valarch” is a data archiving task. It takes -num n as parameter.

You are allowed to run several Valarch (or other) tasks simultaneously ifyou wish. -num is used to differentiate them.

The Console allows you to

-Add new tasks into your system (New)

- Use “Settings” to set startup options, e.g. automaticrestart if a task fails.

The Console displays the running/stopped status of tasks

Allows you to view the ”Console Log”. Tick the box to see thestdoutput/stderrr messages in a new window.

So, what happens when you press Start ?

Page 8: Distributed Control Systems Lecture 3 PVSS In

8

8P.C. Burkimsher CERN School of Computing 2001

PVSS S/W Architecture

User Interface LayerUser Interface Layer

ProcessingProcessing LayerLayer

DriverDriver LayerLayer

CtrlCtrl APIAPI

EVEV

DD DDDD

UIMUIM UIMUIM UIMUIM

DMDM Communication and Communication and Memory LayerMemory Layer

The Data Manager (DM) and the Event manager (EV or EM) start torun.

Any other tasks you have declared in the console start too.

Your (empty) PrivateProject comes up with a user interface task runningthe Graphical Editor called GEDI.

Two versions of GEDI, one on Linux, one on NT. The NT version isknown as Native GEDI (NG).

Page 9: Distributed Control Systems Lecture 3 PVSS In

9

9P.C. Burkimsher CERN School of Computing 2001

Graphics Editor GEDI/NG

• Used for creating control panels.

• Used for animating panels– Making chosen areas on the screen “live”.

– Value displays that change when the valuechanges

– Buttons you can push

Page 10: Distributed Control Systems Lecture 3 PVSS In

10

10P.C. Burkimsher CERN School of Computing 2001

The Native GEDI (NG)

This is the panel you will build during Practical 1.

Page 11: Distributed Control Systems Lecture 3 PVSS In

11

11P.C. Burkimsher CERN School of Computing 2001

Panel Animation• Associated with any graphic element, we

can have scripts.• Mouse click on a button -> Event -> ScriptEventClick 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”).

Not quite C, but is an extended subset. Uses C syntax.

Page 12: Distributed Control Systems Lecture 3 PVSS In

12

12P.C. Burkimsher CERN School of Computing 2001

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 complexprocessing.

But what is a DP really?

Page 13: Distributed Control Systems Lecture 3 PVSS In

13

13P.C. Burkimsher CERN School of Computing 2001

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]

• How does PVSS present this functionality?

The key components of a SCADA system as outlined in the lecture ofW.Salter.

Page 14: Distributed Control Systems Lecture 3 PVSS In

14

14P.C. Burkimsher CERN School of Computing 2001

Data Points (DPs)• A DP is a data structure

– Define hierarchies

• Used to hold all info abouta device being controlled.

• PVSS is Device oriented• No methods (yet). Not OO.

• Structure allows you todefine new instances veryeasily. (“One more, justlike that previous one.”)

Data Point

Not all SCADA products have this grouping facility.

With the control of odd valves and water pumps in industry you canoften manage without the grouping facility.

In High Energy Physics (HEP) we have

Groups of settings for an HT channel

Groups of channels on a board

Groups of boards in a power supply crate

Instantiate a new power supply with the same structure

Page 15: Distributed Control Systems Lecture 3 PVSS In

15

15P.C. Burkimsher CERN School of Computing 2001

Parameterization• Must declare Type first,

then make an Instance.• Use the PARA module

(user interfaceprogram).

• Start it from a button inthe Native GEDI (or bydeclaring a new task inthe Console.)

PARA s creen

DPTs are listed

Expand DPT to see all DPs declared of that type

Expand DP to see its structure (elements)

Expand Data Point Elements (DPEs) to see “configs”.

Most important config is the original config.

Page 16: Distributed Control Systems Lecture 3 PVSS In

16

16P.C. Burkimsher CERN School of Computing 2001

Original config• Can see and change current value of the DPE

here.– Useful for testing and debugging your system offline.

PARA originalconfig screenhere

• But I want to react when a DPE value changes...

Page 17: Distributed Control Systems Lecture 3 PVSS In

17

17P.C. Burkimsher CERN School of Computing 2001

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]

• How does PVSS present this functionality?

The key components of a SCADA system as outlined in the lecture ofW.Salter.

Page 18: Distributed Control Systems Lecture 3 PVSS In

18

18P.C. Burkimsher CERN School of Computing 2001

Scripts• Do something when a DPE changes• Two cases:

– When “something” is on a panel, e.g. updatethe displayed value, or change a colour.

• Very similar to the C-code script behind a buttonpress.

– When no panels are involved.

Page 19: Distributed Control Systems Lecture 3 PVSS In

19

19P.C. Burkimsher CERN School of Computing 2001

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.

void main() {...status =dpConnect("displayValue","sys1:cryoTemperature.actual.value:_online.._value"); ...}void displayValue(string dpName, float changedValue){ this.text = changedValue;} // Update display.

Routine

DPE

Page 20: Distributed Control Systems Lecture 3 PVSS In

20

20P.C. Burkimsher CERN School of Computing 2001

Scripts without a Panel

• You can react on an external event (not anoperator event) i.e. when action script hasnothing to do with a Panel.– e.g. Call a routine if value reaches a limit

• The CTRL manager task runs scripts in thebackground. Scripts look the same.

Page 21: Distributed Control Systems Lecture 3 PVSS In

21

21P.C. Burkimsher CERN School of Computing 2001

Reference Panels• Practical 2 introduces Reference panels.• A Reference Panel = a parameterized panel.• All of the scripts behind the panel are

written with $parameters which are thensubstituted 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.

Page 22: Distributed Control Systems Lecture 3 PVSS In

22

22P.C. Burkimsher CERN School of Computing 2001

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]

• How does PVSS present this functionality?

The key components of a SCADA system as outlined in the lecture ofW.Salter.

Page 23: Distributed Control Systems Lecture 3 PVSS In

23

23P.C. Burkimsher CERN School of Computing 2001

Apropos of nothing

• PVSS written by an Austrian company.• Documentation was all in German. (Some

still is!)• First translations contained some howlers.• Concept of dead-band. Changes in a value

read f rom hardware are consideredinsignif icant within the range of the dead-band, e.g. 0.5%, and ignored.

• Documentation referred to dead-tapes.

Page 24: Distributed Control Systems Lecture 3 PVSS In

24

24P.C. Burkimsher CERN School of Computing 2001

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]

• How does PVSS present this functionality?

The key components of a SCADA system as outlined in the lecture ofW.Salter.

Page 25: Distributed Control Systems Lecture 3 PVSS In

25

25P.C. Burkimsher CERN School of Computing 2001

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 newPVSS project; most common needs.

• Can be suppressed.

Page 26: Distributed Control Systems Lecture 3 PVSS In

26

26P.C. Burkimsher CERN School of Computing 2001

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]

• How does PVSS present this functionality?

The key components of a SCADA system as outlined in the lecture ofW.Salter.

Page 27: Distributed Control Systems Lecture 3 PVSS In

27

27P.C. Burkimsher CERN School of Computing 2001

Trending - I• Most common reason values are archived.• A trend is a Value / T ime plot of a DPEs

value.• Trends can plot “recent” data that isn’t

recorded on disk. (Lost when you stop thetask.)

• PVSS supplies a trend widget, ready made.– Multiple curves. Configurable.– Hairline cursor.

• Value / value plots are also possible.

Page 28: Distributed Control Systems Lecture 3 PVSS In

28

28P.C. Burkimsher CERN School of Computing 2001

Trending - II

While updating the line in real-time you may only look.

If you freeze the update, several function buttons become active:

Pan:

Left-right on the X (time) axis with the scroll bar

Zoom:

Boundaries of X-axis (left and right)

Limits on Y (value) axis (top and bottom)

Page 29: Distributed Control Systems Lecture 3 PVSS In

29

29P.C. Burkimsher CERN School of Computing 2001

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]

• How does PVSS present this functionality?

The key components of a SCADA system as outlined in the lecture ofW.Salter.

Page 30: Distributed Control Systems Lecture 3 PVSS In

30

30P.C. Burkimsher CERN School of Computing 2001

Alert Definitions• PVSS name for 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 beraised (made active). This is kept in the“alert_hdl” config.

– Related information in “alert_class” config.• Priority; Colour; Acknowledgement rules;• Automatic script execution.

To acknowledge an alert means to click on it. This signifies that theoperator has seen (and hopefully read the message and become awareof) the alert condition.

Rules include: Should a “Went” alert be acknowledged separately fromthe corresponding “Came” alert.

alert_hdl is needed on each DPE to define its alert.

alert_class is defined once and shared. For the kind of information thatis the same for many alerts.

Page 31: Distributed Control Systems Lecture 3 PVSS In

31

31P.C. Burkimsher CERN School of Computing 2001

Alert Display• PVSS provided Alert Display panel.• Originally a standard panel

– Now been optimised with C++ inserts.

• If you really wish to implement your ownpanel, you can, but this is notrecommended for performance reasons.

Page 32: Distributed Control Systems Lecture 3 PVSS In

32

32P.C. Burkimsher CERN School of Computing 2001

PVSS Alert Display Panel

Has columns showing:

Short sign of the alert; (Int’l standard.) ) include coloured background

Priority of the alert ) if specified.

Time of alert

DPE name concerned

Alert text

Came/Went direction

DPE value at time of alert

Acknowledge status

“…” for lots more info, e.g. Who acknowledged it

Before the Alert screen appears, there is always a Properties Sub-screen pops up.

Page 33: Distributed Control Systems Lecture 3 PVSS In

33

33P.C. Burkimsher CERN School of Computing 2001

Properties Subscreen

Sophisticated filtering of messages on

Time Range

Alert state

Sorting of Alerts

The default settings are usually quite acceptable!

Your personalised settings can be remembered in a “configuration” forease of recall.

Page 34: Distributed Control Systems Lecture 3 PVSS In

34

34P.C. Burkimsher CERN School of Computing 2001

Group Alerts• Group alert is an additional alert raised at

same time as any alert in a group.• Usef ul for summarising situations.

Allows you to define an additional alert in terms of the existence of oneor more other alerts, e.g. ‘Problem with HV” might be a high priority alertbased on one or more low priority HV channel alerts.

The low-priority detailed alerts may be filtered out on the main controlroom screen, leaving only the “Problem with HV” displayed.

The low priority alerts would be viewed in full on the sub-detectorexpert’s alert screen.

[Group alerts are not covered in the practicals. See the onlinedocumentation for more information.]

There is no magic formula for dealing with alarm avalanches!

Page 35: Distributed Control Systems Lecture 3 PVSS In

35

35P.C. Burkimsher CERN School of Computing 2001

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]

The key components of a SCADA system as outlined in the lecture ofW.Salter.

The practicals do not cover Access Control.

PVSS does allow you to define your own sophisticated levels of

Who can view which screens

Who can press which buttons

etc.

Page 36: Distributed Control Systems Lecture 3 PVSS In

36

36P.C. Burkimsher CERN School of Computing 2001

The Lab Practicals

• 40 machines in the lab; 80 students• => work in pairs

• 6 practicals

• 3 hours scheduled.

Ex. 1 is the longest.

Page 37: Distributed Control Systems Lecture 3 PVSS In

37

37P.C. Burkimsher CERN School of Computing 2001

Lab Practicals 1,2,3• Practical 1: To def ine a simple PVSS

control panel and its associated data pointtypes and data points.

• Practical 2: To instantiate similar controlpanels using a predefined reference panel.

• Practical 3: To demonstrate that acommonly found, but neverthelesscomplex, device (a CAEN power supply)has already been implemented generically.To illustrate the ease of use of the JCOPtools to create new complex instances.

The control panel in Practical 1 is the one we looked at earlier.

Ex.2 is quick and easy. The GEDI refers to a generic panel as areference panel.

Ex. 3: The JCOP software is free to the LHC experiments.

What you will see is a graphical way of defining a power supply:

Declare a CAEN crate type

Populate it with CAEN Boards

Declare and name HT channels on your boards

Of course, you don’t HAVE to use the graphical interface to defineCAEN.

You can import definitions from an ASCII file.

If you have 100s of CAENs, this is what you would do.

Page 38: Distributed Control Systems Lecture 3 PVSS In

38

38P.C. Burkimsher CERN School of Computing 2001

Lab Practical 4• Practical 4: To

build a scatteredsystem with 5CPUs.

• Only perform oneof Practical 4 orPractical 5.

• We usePracticals 4 & 5in Practical 6.

DM

EMUI PC 1 .. PC 4

PC 0

System

Project / Machine

Manage r

UI

UI

Example of a sing le PVSS ScatteredSystem, built out of two or more pro jects,each proj ect on its own mach ine bu t with atotal of one Event Manag er/Data Man agerpair in the en ti re system.

Wayne Salter described distributing the work of a single control systemacross many processors. We call this a Scattered System

A PVSS System is an EV/DM pair + other tasks.

A scattered system is where the other tasks run on other machines.

For efficiency’s sake, it is best to keep the EV/DM pair on a singlemachine.

The diagram above only shows 3 machines.

What we do not do: Connect to any real hardware!

Page 39: Distributed Control Systems Lecture 3 PVSS In

39

39P.C. Burkimsher CERN School of Computing 2001

Lab Practical 5• Practical 5 is identical to Practical 4.

• Practical 5: To build a scattered systemwith 5 CPUs.

• Only perform one of Practical 4 or Practical5.

• We use Practicals 4 & 5 in Practical 6.

Page 40: Distributed Control Systems Lecture 3 PVSS In

40

40P.C. Burkimsher CERN School of Computing 2001

Lab Practical 6• Practical 6: To

join the twoScatteredSystemsproduced byPracticals 4and 5 into oneDistributedSystem.

Example of one distributed PVSS system (i.e. two PVSS simple systems). There are two pro jects, two machine s and two EM / DM pairs.

Distributed System

System / Project / Machine

Manage r

DM

EM

UI

DM

EM

UI

Apologies for the naming here!

ETM call one EV/DM pair a system.

They call multiple communicating systems, a distributed system.

A distributed system has several communicating pairs of EV/DM.

Page 41: Distributed Control Systems Lecture 3 PVSS In

41

41P.C. Burkimsher CERN School of Computing 2001

Final remarks• How to access the online help:

– In NG, click “?”

– Also in German. Some useful phrases at theend of the practical handout!

• IT -CO offer support for LHC experimentsworking with the PVSS product:– [email protected]– http://itcowww.cern.ch/pvss2/index.htm

Page 42: Distributed Control Systems Lecture 3 PVSS In

42

42P.C. Burkimsher CERN School of Computing 2001

Summary

• PVSS is a powerful SCADA tool• Gives us an enormous head-start in

building our control systems.• JCOP Framework is an HEP-specific layer

that helps us (you) even more.• The practicals will let you try out PVSS f irst

hand.

The practicals show:

PVSS systems are SCALABLE.

Independent subsystems can be developed and then integrated.

UIs can join and leave the system.

Remote access over the net (but not the web, yet).

Subsystems can join and leave, while rest of system runs. (Partitioning,AWG recommendations)

EM is a single point of failure in a system. Can have a redundantsystem, but in the detectors at least, no-one has asked for one yet.

Page 43: Distributed Control Systems Lecture 3 PVSS In

43

43P.C. Burkimsher CERN School of Computing 2001

• Any questions?

PVSS in Practice

Page 44: Distributed Control Systems Lecture 3 PVSS In

44

44P.C. Burkimsher CERN School of Computing 2001


Recommended