SNS EPICS Config. Database

Document Sample
SNS EPICS Config. Database Powered By Docstoc
					SNS EPICS Config. Database

     May 2001
     Kay-Uwe Kasemir, LANL
    Approaches to EPICS DB Generation
   Text Editor, Capfast, xdct
     *.DB
   Device Info + Script
     *.DB
   Template + Substitution Table from RDB
     *.DB
   Template + Device Info from RDB
    + Script
     *.DB
   Common: Results in DB file
    Put EPICS *.DB in RDB
   Experience:
      Quickly import “signal lists” for e.g. PLCs
      Tabular view allows rapid data entry

      RDB helpful for setting e.g. limits of related
       records at once
      Debugging: “Where is PV XYZ supposed to be?”

      RDB provides reports: signal lists, used/unused
   Problem: How to include external sources, e.g.
    Capfast schematics, and keep track of changes to
    both external source and RDB?
„IOC‟ Table
   Perl:

   Java:
„Logic‟ Table
   Logic = collection of records, could be
       Device
       Algorithm
       Subsystem
       IOC

                             Logic Id=IOC Id
Implementation Details
   Helper Tables
       Record Types
       Allowed Fields
       Menus for fields   (SCAN, PINI, alarm severities, …)

   Each record has “External Source”
       Original DB file, Capfast schematic
   Each field has External + Internal Value
       From external source + (maybe) modification
    RecBrowser for Single Record
   Edit single record
   All fields with
    maybe menus
   Shows external
    source & value
   Edit internal
TableBrowser for „Logic‟
   Add, remove, sort, filter, fill columns
   Color-coded values:
    Basic Spreadsheet Support
   Perl tools for Import/Export
       ASCII, Columns have to match EPICS fields
Scenario: Have (Capfast)-DB
   Check/Define IOC and Logic for that DB
   Create DB from Capfast
   Import DB, specify the Capfast drawing as
    the “external source”
   Create *.DB for IOC
       could use the original DB, but this assures that the
        import worked
   For changes:
       RDB indicates Capfast drawing, so that source can
        be changed and re-imported
    Scenario: Signal List
   Setup:
        Define IOC and logic
        Import spreadsheet into that logic
   Use TableBrowser to “fill blanks”, add
    records, modify errors
   Generate DB file from RDB
   Changes:
        Might change spreadsheet and re-import, though
         in many cases the spreadsheet contained only
         rudimentary information (NAME, INP/OUT) and is
         rarely used again.
    Scenario: Template &
    Substitution Info
   Setup:
       IOC, Logic
   On Host, create DB from Template plus
    Device Information from RDB, script,
    substitution file, …
   Import DB, specify the script as the “external
   When modifying, RDB indicates original
    source, so that template/device information
    can be changed and re-imported
                 Capfast template Device RDB            SQL,
emacs, vi, ...                                 <?>
     *.DB                  *.DB                *.DB

         EPICS RDB: reports, define missing fields, ...

                       maybe startup, dbd