Controls EN-ICE FSM for dummies (…w/ all my respects) 15 th Jan 09.

Post on 29-Jan-2016

216 views 0 download

transcript

Controls EN-ICE

FSM for dummies(…w/ all my respects)

15th Jan 09

Controls EN-ICETypical DCS application

FSM for dummies - 2F. Varela – EN/ICE – UNICOS Meeting – 15th Jan 09

Developed by: Collaborations CERN-UniversitiesMany temporary stuff

Operated by a non-experience shifter Concurrent access by multiple users

More than 1M IOs Large variety of technologies150 computers

User know

ledge of the system

Heterogeneity/

Com

plexity-

+

Controls EN-ICEImplementation

Front-End(CAEN/Wiener/Iseg, ELMB,

etc.)

Middleware(OPC, DIM, DIP, drivers,

etc)

PVSS

Front-End(CAEN/Wiener/Iseg, ELMB,

etc.)

Middleware(OPC, DIM, DIP, drivers,

etc)

PVSS

x150

What do we have?

Panels and control procedures requiring a deep understanding of the detectors/systems150 peers with no hierarchical organization

What are we lacking?

Modelling of a abstract entities in the control system Hierarchical organization: Tree! Knowledge encapsulation Sequencing and synchronization across (and within) PVSS systems Partitioning management Ownership

FSM

FSM for dummies - 3F. Varela – EN/ICE – UNICOS Meeting – 15th Jan 09

JCOP Framework

Framework: Brings homogenization to the systemHides complexity of the HW

Controls EN-ICEA very simple example

T1HV1

FSM for dummies - 4F. Varela – EN/ICE – UNICOS Meeting – 15th Jan 09

T2 PumpHV2

HV3

LV1 LV2LHC

Constraints for operation:

HV can be ramped up to a reduced value only if cooling is OK and LV is ON

HV can be ramped up to the nominal value only if LHC report stable beams, cooling is OK and LV is ON

JCOP Framework

fwExtApps

fwElmbfwCAE

N

So far, in the application one only knows about individual devicesLHC

Cooling LV HV

Tracker

Temperatures: OKNOT_O

K

UNK

Pump: RUNNING

STOPPED

ERROR

STDBY

Cooling: READYN_READ

Y

ERROR

States based on states of the children according to rules

Controls

... as it is used in the JCOP Framework ?

a tool to model controls systems • …by breaking it into smaller and simpler units

with several states each with several associated actions

all is implemented in the SState MMachine IInterface

SMI++

What is a FSM?

FSM for dummies - 5F. Varela – EN/ICE – UNICOS Meeting – 15th Jan 09

Controls

The FSM is the tool that: summarizes the conditions of the many devices in the

DCS into a single overall state allows the shifter to operate the detector with a few

mouse-clicks• Forces developers to hide the complexity of the system

The DCS of the LHC experiments consists of a large variety of complex devices and technologies

Why FSM?

FSM for dummies - 6F. Varela – EN/ICE – Section Meeting – 24th Nov 09

Controls

PVSS• UI, archiving, configuration persistency, Alarm Handling,

Access Control, proxies DIM

• for inter process communication SMI++

• FSM behaviour

The JCOP FSM toolkit consists of:

JCOP FSM

FSM for dummies - 7F. Varela – EN/ICE – Section Meeting – 24th Nov 09

Controls

GasLV LVHVHV HVCoolingCooling Gas

DCS

TrackerVertex Muon

LVGasLV HVHVHV GasCoolingCooling

Com

man

ds

Sta

tes

& A

larm

s

CU/LU

DU

Control and Logical Units abstract entities. Logical decision units. Only CU allow for partitioning LU are lighter weight

Device Units model real and concrete devices/entities, e.g. a HV channel, a crate, a temp sensor.

An example system

FSM for dummies - 8F. Varela – EN/ICE – Section Meeting – 24th Nov 09

Controls Control Unit Overview

PVSS II

Parent

Commands/StatesConfiguration

Database

Operator

Child Child Child

Commands/States

Commands/StatesCommands/States

Commands/States

Configuration data

SpecificBehavior

FSMLogging &Archiving

AlarmHandling

Ownership &Partitioning FSM

Controls Logical Unit Overview

PVSS II

Parent

Commands/StatesConfiguration

Database

Operator

Child Child Child

Commands/States

Commands/StatesCommands/States

Commands/States

Configuration data

SpecificBehavior

FSMLogging &Archiving

AlarmHandling

Controls Device Unit Overview

PVSS II

Parent

Commands/StatesConfiguration

Database

Operator

HW/SW Device

Commands/States

Settings & Readings

Configuration data

Logging &Archiving

AlarmHandling

FSMInterface

DeviceDriver

Controls JCOP Framework Names

Device Typemodelling of a hardware or logical device with PVSS datapoints

Deviceinstance of a device type

Device Unit Typemodelling of a behaviour based

on a device type

Device Unitinstance of a device unit type based on a device

Logical Unit Typemodelling of behaviour for an abstract object

Control Unitinstance of a logical unit type running

as a SMI domain

Logical Unitinstance of a logical unit type running

inside a SMI domain

Controls Partitioning

DCS

TrackerVertex Muon

GasLV LVHVHV HVCoolingCooling Gas

LVGasLV HVHVHV GasCoolingCooling

Controls Partitioning Modes

Parent

Childcommands

states

IncludedIncludedchild fully controlled by parentchild fully controlled by parent

Parent

Childcommands

states

IgnoredIgnoredparent ignores the child’s statesparent ignores the child’s states

Parent

Childcommands

states

ManualManualparent does not send commandsparent does not send commands

Parent

Childcommands

states

ExcludedExcludedchild child notnot controlled by parent controlled by parent

Controls PVSS Integration

CtrlCtrl

APIAPIEVEV

DD DDDD

UIMUIM UIMUIM UIMUIM

DMDMDBDB

PVSS00smi

fwFsmSrvr

CtrlCtrl

DU Handler

In other words, PVSS acts as UI to configure and operate the SMI++ procs

SMI++ (Real FSM Machinery)

PVSS

SML Files

1. User defines FSM hierarchy and node behaviour in PVSS2. fwFSMSrvr create SML files containing this knowledge3. SMI++ procs read SML files at start-up and implements the FSM behaviour

SML parallel and asynchronous execution

Controls Sending a command

APIAPIEVEV

DDDistDist

UIMUIM UIMUIM

DMDMDBDBPVSS00smi

CtrlCtrl

APIAPIEVEV

DDDD

UIMUIM

DMDMDBDBPVSS00smi

DU Handler

DistDist

Machine 1

Machine 2

Controls A device changes state

APIAPIEVEV

DDDistDist

UIMUIM UIMUIM

DMDMDBDBPVSS00smi

CtrlCtrl

APIAPIEVEV

DDDD

UIMUIM

DMDMDBDBPVSS00smi

DU Handler

DistDist

Machine 1

Machine 2