Introduction to the CS framework Definition of a framework Requirements Example Idea Cooking recipe...

14
Introduction to the Introduction to the CS CS framework framework • Definition of a framework • Requirements • Example • Idea • Cooking recipe • Some statements Dietrich Beck, [email protected] http://www-w2k.gsi.de/labview/CS/cs.htm

Transcript of Introduction to the CS framework Definition of a framework Requirements Example Idea Cooking recipe...

Introduction to the Introduction to the CSCS framework framework

• Definition of a framework

• Requirements

• Example

• Idea

• Cooking recipe

• Some statements

Dietrich Beck, [email protected]

http://www-w2k.gsi.de/labview/CS/cs.htm

01.11.2004 Dietrich Beck, [email protected]

A framework...A framework...

• provides features that are commonly needed by many experiments.

• can be maintained be a dedicated and central group.

• allows for exchanging software and know-how.

• saves man power.

• should scale with future experiments.

control system = framework + add-ons

ECOS experiment

bug reports, new features requested

add-ons may become part of framework

bug fixes, new features, maintenance

01.11.2004 Dietrich Beck, [email protected]

RequirementsRequirements

Developer• Only one development tool, that is easy to learn• Hard- and Software commercially available• Maintainability• Software is structured into small (independent) packages• Applicability to many different projects• Documentation

User• Flexibility!!! – Multiplicity and type of used components as well as operational states(!)

configurable on the fly• System is operational during 100% of the time• Comfortable handling• Performance! Fast reaction time (ms). Repeat sequences at a rate of 10Hz and a

granularity of 1ns. • Access to and from everywhere

01.11.2004 Dietrich Beck, [email protected]

Example 1: SHIPTRAPExample 1: SHIPTRAP

STOP-CELL

EXTRACTION RFQ

BUNCHER &COOLER

TRANSFER REGION

PREPARATIONTRAP

cold ion bunches

SHIP extraction to ext. experiments

PRECISION TRAP

mass measurements

100* 50 50 50 50

* # of process variables

01.11.2004 Dietrich Beck, [email protected]

Complex timing schemeComplex timing schemeCycle:stopping of ions ion the gas cell (static)

extraction from the gas cell

transfer

capture and cool ions in the buncher

ejection from the buncher (dynamic)

transfer

capture in the cooler trap

mass selective buffer gas cooling

ejection from the cooler trap

transfer

capture in the precision trap

purification

excitation of ion motion at RF c = (q/m) · B ( gain of energy)

measurement of kinetic energy via a time-of-flight technique

Scan: repeat cycle for different frequencies (minutes-days)

1s134Nd

01.11.2004 Dietrich Beck, [email protected]

Idea behind the Idea behind the CSCS framework framework

• Distributed, individual objects are

responsible for subtasks, as: –User interface

–Cycle control

–Acquisition

–Devices

• No intrinsic bottleneck: Everything can talk to everything

Using ‘standard’ pieces:Flexible system, that can even duringruntime be adapted to the experiment

CycleControl

AFGTiming+DAQ HV

GUI

01.11.2004 Dietrich Beck, [email protected]

Cooking recipeCooking recipe

• One development tool LabVIEW– Fast learning curve– Multi-Threading– Event driven communication

• Object oriented approach ObjectVIEW– Create objects (processes) on the fly– Create high level classes by inheriting from base classes– Encapsulate data and their treatment “information hiding”

• SCADA functionality (alarming, trending, …) LabVIEW DSC module

• Distributed system on several nodes TCP/IP– Scalability– Remote access– …

01.11.2004 Dietrich Beck, [email protected]

StatementsStatements

• Each object represents a hardware device, an application layer item or a GUI.

• Typically, objects are not static. They contain active code.• Each Lego brick corresponds to an object.• Lego tubes and studs are realized by an event mechanism:• (Of course, an object can send an event to itself.*)• (Of course, one can also use direct method calls.)• Objects are created and destroyed on-the-fly*. Different experiments may still use the same binary .exe.

* much better than Lego

wait for event

send event

01.11.2004 Dietrich Beck, [email protected]

... more statements ...... more statements ...

• Our OS is neither Windows, nor Linux, nor ... .• Our OS is LabVIEW!• Active objects are no processes in the OS, but threads within the

LabVIEW environment.• Multi-threading/tasking is organized by the internal scheduler. If LabVIEW crashes, everything crashes.• Events/semaphores are only valid within one LabVIEW

runtime/development system, but:• Several runtime/development systems can be coupled together via

a CS server and client. But:• Only one CS system per node.

01.11.2004 Dietrich Beck, [email protected]

... even more statements ...... even more statements ...

• A LabVIEW "*.exe" file is not an executable. It requires a LabVIEW runtime system.

• Neither a LabVIEW ".exe" nor the LabVIEW runtime system contain drivers. They must be installed separately on the target system.

• If one uses the Datalogging and Supervisory Control (DSC) module, one must install the DSC runtime system seperately.

• If one uses OPC servers, one must install ... .

01.11.2004 Dietrich Beck, [email protected]

... statements continued ... statements continued ... ...

• So far, CS is device oriented.– high performance, no intrinsic bottlenecks– no security or user management implemented (yet)

• CS ... : – was: based on third-party toolkit ObjectVIEW– is: based on core developed at GSI– will be: what about LabVIEW 8?

01.11.2004 Dietrich Beck, [email protected]

... final statements... final statements

• LabVIEW is more expensive than emacs and gcc.

• PCs are cheap, but...

• control software is using more resources than office software – I/O– CPU– memory

• control software is a good test program for PC hardware

• PCI or cPCI/PXI?

• commodity hardware or industrial PCs?

01.11.2004 Dietrich Beck, [email protected]

Example for a simple control systemExample for a simple control systemUser PC n

Control GUIOn-line Analysis GUI

Central PC

Sequencer

DataCollector DSC EngineDSC Interface

SR430 PPG100 DS345

Front-end PC 1

Data Acquisition

DataAcq. Instr. Driver

Timing

Timing Instr. Driver

AFG

AFG Instr. Driver

High Voltage

HV Instr. Driver

IHQF015p

Hardware Software (Proc) Software (Lib) Exp. Specific General Part Buy! Event OPC

Front-end PC n

DiscArchiver

01.11.2004 Dietrich Beck, [email protected]

Usage of the CS framework todayUsage of the CS framework today

• experiments requiring high flexibility

• experiments with a large variety of hardware types

• experiments with up to 10,000 process variables

PHELIXPHELIX

Motion CaveAMotion CaveA

SHIPTRAPSHIPTRAP

ISOLTRAPISOLTRAP

REXTRAPREXTRAP

LEBITLEBIT

GSI, GermanyGSI, Germany

CERN, SwitzerlandCERN, Switzerland

MSU, USAMSU, USA

data takingdata taking

developmentdevelopment

commissioningcommissioning