Presentation is loading. Please wait.

Presentation is loading. Please wait.

CANADA’S NATIONAL LABORATORY FOR PARTICLE AND NUCLEAR PHYSICS Owned and operated as a joint venture by a consortium of Canadian universities via a contribution.

Similar presentations


Presentation on theme: "CANADA’S NATIONAL LABORATORY FOR PARTICLE AND NUCLEAR PHYSICS Owned and operated as a joint venture by a consortium of Canadian universities via a contribution."— Presentation transcript:

1 CANADA’S NATIONAL LABORATORY FOR PARTICLE AND NUCLEAR PHYSICS Owned and operated as a joint venture by a consortium of Canadian universities via a contribution through the National Research Council Canada LABORATOIRE NATIONAL CANADIEN POUR LA RECHERCHE EN PHYSIQUE NUCLÉAIRE ET EN PHYSIQUE DES PARTICULES Propriété d’un consortium d’universités canadiennes, géré en co-entreprise à partir d’une contribution administrée par le Conseil national de recherches Canada CANADA’S NATIONAL LABORATORY FOR PARTICLE AND NUCLEAR PHYSICS Owned and operated as a joint venture by a consortium of Canadian universities via a contribution through the National Research Council Canada LABORATOIRE NATIONAL CANADIEN POUR LA RECHERCHE EN PHYSIQUE NUCLÉAIRE ET EN PHYSIQUE DES PARTICULES Propriété d'un consortium d'universités canadiennes, géré en co-entreprise à partir d'une contribution administrée par le Conseil national de recherches Canada Host-Based (and IOC-Based) Sequences Pam Gurd

2 April, 2009Pam Gurd Host-Based Sequences: Outline CPPE now –What is it? –Examples of sequences –Macros Why move to Perl How it works –Examples: screen shots –Where it's deployed –Including CXML Where we're going

3 April, 2009Pam Gurd CPPE Now: What is it? A host-based sequencer C program cppe: Command Procedure Processor for EPICS Processes a procedural language –Variable definitions: All PVs must be defined, else it won't execute –Syntax check; won't execute if not okay –Procedural steps –Including waits and conditions –PVs for procedure locking, abort, and message reporting defined by engineer and explicitly handled in the procedure

4 April, 2009Pam Gurd CPPE Now: Examples rampps – ramp power supply (specified by argument) pump2a – pumpdown procedure rfqpscfg – turn on RFQ power supplies targetheat – ramp 2 heaters together

5 April, 2009Pam Gurd CPPE Now: Macros Captures operator actions –Between operator start and stop –CaPutLog → file These files can be converted for execution by cppe

6 April, 2009Pam Gurd Why move to Perl Perl provides more capability than the cppe language Perl is already used extensively in the system – removes a language from the required knowledge base – Some programmers find cppe hard to use Rapid prototyping Allow (impose?) standardization of environment Improve display of procedure and status

7 April, 2009Pam Gurd CPP.pm A package of Perl routines that implements an API for procedural host-based sequences –Wrapper around CA.pm –Handle PV connections –Provide routines to get data from PVs and send data to PVs –Provide delays and condition testing –Defines standard methods for abort, lock/synchronizing/exclusion and reporting –Provide a way to register a cleanup procedure –Allow parameterized common routines

8 April, 2009Pam Gurd CPP.pm - Screen Shot Start Button Abort Button Area for messages

9 April, 2009Pam Gurd Where it's used Not in production yet. Translations of a few cppe procedures have been tested.

10 April, 2009Pam Gurd …well, a little bit different.

11 April, 2009Pam Gurd CXML State Machine defined using XML –Using XML definition for telephony: State Chart XML (SCXML): State Machine Notation for Control Abstraction (http://www.w3.org/TR/scxml/) –modified for controls Automatically produces edl screens and database files to support the state machine. Perl option uses the CPP.pm package. – Uses TK for optional display Or can automatically produce an EPICS SNL file to run on an IOC.

12 April, 2009Pam Gurd CXML at Work XML EPICS database EDL display files EPICS SNL sequence Direct execution using Perl (optional display using Tk) (Uses database created previously) CXML -t -e -d -s

13 April, 2009Pam Gurd CXML: XML fragment <send target="par(PS):DRVON" targettype="epics-pv" data="1"/> <transition cond="pv(par(PS):STATON) < 0.5" target="All_done"> <send target="CXML:par(PS):RAMPSTAT" targettype="epics-pv" data="2"/>

14 April, 2009Pam Gurd CXML: Database The entity was added to the SCXML specification Abort, start, lock and message PVs Other support PVs for the state machine –Eg, limits, steps, wait times –Also can define latches for momentary conditions –Uses event flags on PVs it's watching Command line parameters –To allow parameterization of PV names and limits, for example

15 April, 2009Pam Gurd CXML: Screen Shot Load Button (appears when it's not loaded) Abort Button (appears when it's running) Area for messages Start Button State Machine Description (note highlighted active state) Operator Help

16 April, 2009Pam Gurd CXML is Deployed In two test areas: –Laser Ion Source ramps the tube and crucible heaters up and down Ramps the bias voltage up and down –Source Test Stand ramps the tube and target heaters up and down Both of these use SNL.

17 April, 2009Pam Gurd Where we're going Replace the cppe procedures for maintainability Direct CPP.pm vs CXML? –A procedure that just turns a list of devices on or off probably doesn't make much sense as a state machine. –More natural to convert an existing cppe procedure to Perl sequences with CPP.pm –Once other engineers are trained in the CXML approach, they may find that natural as well. Perl vs SNL? There aren't any SNL sequences in the production ISAC control system now. Recreate the macro facility (work on captured caPutLog)

18 April, 2009Pam Gurd Going Further Take a census of SNL functions and add what's missing Take a census of SCXML functions and add any that seem relevant A visual state machine editor

19 April, 2009Pam Gurd 4004 Wesbrook Mall Vancouver, B.C. Canada V6T 2A3 Tel: 604 222-1047 Fax: 604 222-1074 www.triumf.ca Thank you! Merci! Everyone's Favourite Slide


Download ppt "CANADA’S NATIONAL LABORATORY FOR PARTICLE AND NUCLEAR PHYSICS Owned and operated as a joint venture by a consortium of Canadian universities via a contribution."

Similar presentations


Ads by Google