Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The documentation for each db file can be found at the top of the corresponding substitutions file. \[Wouldn't it be nice to have a better place to keep it? It can't get into the db files because it's not a macro, and the template files used are also used in other ways, so the documentation wouldn't apply.\]

The databases are:

Bsa.db (load once for each BSA PV, or use as a template with 1 line per BSA PV)

EvrPmc.db (Load once for each EVR in the system, usually 1)

Pattern.db (Load once per IOC)

*-trig.db (flavors are PMC-trig.db, VME-trig.db, and VME-TTB-trig.db. Load for each piece of hardware, e.g. for a PMC on the VME processor board with rear transition board load PMC... and VME-TTB...)

An example of using these directly in st.cmd would look like this:


## Load record instances for Timing. 2 BSA PVs, a PMC EVR with rear Trigger Transition Board (TTB)
dbLoadRecords("db/EvrPmc.db","EVR=EVR:B34:EV05,CRD=0, SYS=SYS0")
dbLoadRecords("db/Pattern.db","IOC=IOC:B34:EV05, SYS=SYS0")
dbLoadRecords("db/Bsa.db","DEVICE=TRIG:B34:EV05, ATRB=COUNTER, SYS=SYS0")
dbLoadRecords("db/Bsa.db","DEVICE=TRIG:B34:EV05, ATRB=SINE, SYS=SYS0")
dbLoadRecords("db/PMC-trig.db", "LOCA=B34,UNIT=EV05,SYS=SYS0,IOC=IOC:B34:EV05")
dbLoadRecords("db/VME-TTB-trig.db", "LOCA=B34,UNIT=EV05,SYS=SYS0,IOC=IOC:B34:EV05")

give the first trigger, DEV0, a non-default name:

dbLoadRecords("db/VME-trig.db", "LOCA=UND1,UNIT=RM01,SYS=SYS0,IOC=IOC:UND1:RM01,DEV0=QADC:UND1:100:")

or in a substitutions file:

file Bsa.db
{
  pattern {DEVICE,            ATRB,    SYS   }
          { BLM:UND1:1345,    QDCRAW,    SYS0  }
          { BLM:UND1:1435,    QDCRAW,    SYS0  }

EvrPmc

#==============================================================================
# Abs:  LCLS EVR records for bpm EVRs
#
# Name: EVR.substitutions
#
# Macros:
#     
#   evr.db - instantiates an EVR record.
#    Associated display is evrDiags.edl.
#    DEV    Name of EVR - EVR:<loca>:<unit>
#    CARD    EVR card number starting at 0 (matches card number in ErConfigure).
#
#    evrEventCtrl.db - instantiates a record for an EVR event.
#    Associated display is evrTriggerDiags.edl.
#    DEV    Name of EVR - EVR:<loca>:<unit>
#    CARD    EVR card number starting at 0 (matches card number in ErConfigure).
#
#  Optional:
#   SYS     SYS code for the system where this EVR is deployed:
#       SYS0 for LCLS
#       SYS1 for FACET
#       SYS2 for LCLS II
#    IDn    Defining SYS will select the most commonly used event code numbers for the
#       specific system. To override these defaults, define IDn where n is 1-14.
#       Event code number.  To find all available event codes:
#        lclshome -> Event -> Events... (in the EVG IOC bo14).
#        This display brings up all the event that are beam-dependent.
#            For events that are beam-independent (constant or standby), select
#        "Time Slot 1 to 6 Event Codes".  Find the event that you want to trigger one or
#        more devices connected to the EVR.  Use number in the Event Code column.
#        Also check sharepoint spreadsheet:
#        Controls -> Timing -> timingEventCodes
#        NOTE: There is a dependency on event code assignments and triggers.
#             When changing event code assignments below, also change the appropriate
#            <ioc>trig.substitutions file!
#        NOTE: If you don't need to use all 14 event codes, populate the spare records
#        with other event codes from the "Time Slot 1 to 6 Event Codes" display.
#

...