SlideShare a Scribd company logo
1 of 11
Download to read offline
Outline
                                                                                                                   Records
                                                                                                                   Fields and field types
                                                                                                                   Record Scanning
                    What is an EPICS                                                                               Input and Output record types

                    Database?                                                                                      Links, link address types
                                                                                                                   Connecting records together
                                                                                                                   Protection mechanisms
                                                  Andrew Johnson
                                                                                                                   Alarms, deadbands, simulation and security
                                                  October 26, 2004



                   Argonne National Laboratory
                                                A U.S. Department of Energy
                                                Office of Science Laboratory
                                                                                                            Pioneering                                              Office of Science
                   Office of Science
                    U.S. Department of Energy   Operated by The University of Chicago                       Science and                                             U.S. Department
                                                                                                            Technology                                                      of Energy




Database = Records + Fields +                                                                               Record Activity
Links system using EPICS will contain one or more IOCs
   A control                                                                                                       Records are active — they can do things:
        Each IOC loads one or more Databases telling it what to do                                                    Get data from other records or from hardware
        A Database is a collection of Records of various types                                                        Perform calculations
        A Record is an object with:                                                                                   Check values are in range & raise alarms
           A unique name                                                                                              Put data to other records or to hardware
           A behaviour defined by its record type (class)                                                             Activate or disable other records
           Controllable properties (fields)                                                                           Wait for hardware signals (interrupts)
           Optional associated hardware I/O (device support)                                                       What a record does depends upon its record type and the
           Links to other records                                                                                  settings of its fields
                                                                                                                   No action occurs unless a record is processed




 Pioneering                                                                             Office of Science   Pioneering                                              Office of Science
 Science and                                                                            U.S. Department     Science and                                             U.S. Department
 Technology                                                                                     of Energy   Technology                                                      of Energy




                                                                                                                                                                                        1
How is a Record                                                              One view of a Record
implemented? both data storage and pointers to record
  A ‘C’ structure with
        type information
        A record definition within a database provides
           Record name
           The record’s type
           Values for each design field
        A record type provides
           Definitions of all the fields
           Code which implements the record behaviour
        New record types can be added to an application as needed




 Pioneering                                              Office of Science   Pioneering                                          Office of Science
 Science and                                             U.S. Department     Science and                                         U.S. Department
 Technology                                                      of Energy   Technology                                                  of Energy




A graphical view of a Record                                                 Another graphical view of a
                                                                             Record



                                                                                           The small CapFast symbol for an Analogue
                                                                                                        Output record




 Pioneering                                              Office of Science   Pioneering                                          Office of Science
 Science and                                             U.S. Department     Science and                                         U.S. Department
 Technology                                                      of Energy   Technology                                                  of Energy




                                                                                                                                                     2
The IOC’s view                                                                                   Fields are for...
                 The full .db file entry for an Analogue Output Record                              Defining
  record(ao,"DemandTemp") {      field(OIF,"Full")              field(HHSV,"NO_ALARM")                 What causes a record to process
     field(DESC,"Temperature")                                  field(LLSV,"NO_ALARM")
                                   field(PREC,"1")
                                                                                                       Where to get/put data from/to
     field(ASG,"")                 field(LINR,"NO               field(HSV,"NO_ALARM")
     field(SCAN,"Passive")           CONVERSION")               field(LSV,"NO_ALARM")                  How to turn raw I/O data into a numeric engineering value
     field(PINI,"NO")              field(EGUF,"100")            field(HYST,"0.0e+00")
     field(PHAS,"0")               field(EGUL,"0")              field(ADEL,"0.0e+00")
                                                                                                       Limits indicating when to report an alarm
                                   field(EGU,"Celcius")
     field(EVNT,"0")
                                   field(DRVH,"100")
                                                                field(MDEL,"0.0e+00")                  When to notify value changes to a client monitoring the record
     field(DTYP,"VMIC 4100")                                    field(SIOL,"")
     field(DISV,"1")               field(DRVL,"0")              field(SIML,"")                         A Processing algorithm
     field(SDIS,"")                field(HOPR,"80")             field(SIMS,"NO_ALARM")
     field(DISS,"NO_ALARM")        field(LOPR,"10")             field(IVOA,"Continue
                                                                                                       Anything else which needs to be set for each record of a given type
     field(PRIO,"LOW")             field(HIHI,"0.0e+00")          normally")
                                                                                                    Holding run-time data
     field(FLNK,"")                field(LOLO,"0.0e+00")        field(IVOV,"0.0e+00")

     field(OUT,"#C0 S0")           field(HIGH,"0.0e+00")    }                                          Input or output values
                                   field(LOW,"0.0e+00")
     field(OROC,"0.0e+00")
                                                                                                       Alarm status, severity and acknowledgements
     field(DOL,"")
     field(OMSL,"supervisory")                                                                         Processing timestamp
              This shows only the design fields, there are other fields which                          Other data for internal use
                                are used only at run-time
Pioneering                                                                   Office of Science    Pioneering                                                               Office of Science
Science and                                                                  U.S. Department      Science and                                                              U.S. Department
Technology                                                                           of Energy    Technology                                                                       of Energy




Field types                                                                                      All Records have these fields
  Fields can contain                                                                             Design fields
      Integers                                                                                        NAME     60 Character unique name (using more than 28 char’s can cause problems)
          char, short or long                                                                         DESC     28 Character description
                                                                                                      ASG      Access security group
          signed or unsigned                                                                          SCAN     Scan mechanism
      Floating-point numbers                                                                          PHAS     Scan order (phase)
          float or double                                                                             PINI     Process at IOC initialization?
      Strings                                                                                         PRIO     Scheduling priority
                                                                                                      SDIS     Scan disable input link
          maximum useful length is 40 characters
                                                                                                      DISV     Scan disable value
      Menu choices                                                                                    DISS     Disabled severity
          select one from up to 16 strings                                                            FLNK     Forward link
          stored as a short integer                                                              Run-time fields
      Links                                                                                           PROC     Force processing
                                                                                                      PACT     Process active
          to other records in this or other IOCs                                                      STAT     Alarm status
          to hardware signals (device support)                                                        SEVR     Alarm severity
          provide a means of getting or putting a value                                               TPRO     Trace processing
      Other private data                                                                              UDF      Set if record value undefined
          not directly accessible                                                                     TIME     Time when last processed



Pioneering                                                                   Office of Science    Pioneering                                                               Office of Science
Science and                                                                  U.S. Department      Science and                                                              U.S. Department
Technology                                                                           of Energy    Technology                                                                       of Energy




                                                                                                                                                                                               3
Record Scanning                                                             Input records often have these
                                                                                INP  Input link
  SCAN field is a menu choice from
     Periodic — 0.1 seconds .. 10 seconds
                                                                            fields
                                                                                DTYP
                                                                                RVAL
                                                                                     Device type
                                                                                     Raw data value
     I/O Interrupt (if device supports this)                                          VAL     Engineering value
     Soft event — EVNT field                                                          LOPR    Low operator range
                                                                                      HOPR    High operator range
      Passive (default)
                                                                                   Analogue I/O records have these fields:
  The number in the PHAS field allows processing order to be set                      EGU     Engineering unit string
  within a scan                                                                       LINR    Unit conversion control: No conversion, Linear, Slope,
      Records with PHAS=0 are processed first                                                     breakpoint table name
      Then those with PHAS=1 , PHAS=2 etc.                                            EGUL    Low engineering value
                                                                                      EGUF    High engineering value
  Records with PINI=YES are processed once at startup                                 ESLO    Unit conversion slope
  PRIO field selects Low/Medium/High priority for Soft event and                      EOFF    Unit conversion offset
  I/O Interrupts
  A record is also processed whenever any value is written to its
  PROC field
Pioneering                                              Office of Science   Pioneering                                                      Office of Science
Science and                                             U.S. Department     Science and                                                     U.S. Department
Technology                                                      of Energy   Technology                                                              of Energy




Periodic Input                                                              Interrupt Input




Pioneering                                              Office of Science   Pioneering                                                      Office of Science
Science and                                             U.S. Department     Science and                                                     U.S. Department
Technology                                                      of Energy   Technology                                                              of Energy




                                                                                                                                                                4
Output records link
       OUT  Output
                    often have these                                              Passive Output
            Device type
fields VAL
       DTYP
            Engineering value
               RVAL        Raw output value
               DOL         Input link to fetch output value
               OMSL        Output mode select:
                              Supervisory, Closed Loop
               LOPR        Low operator range
               HOPR        High operator range
              Analogue outputs also have these fields:
               OROC        Output rate of change
               OIF         Incremental or Full output
               OVAL        Output value
               DRVH        Drive high limit
               DRVL        Drive low limit
               IVOA        Invalid output action
               IVOV        Invalid output value
               RBV         Read-back value



Pioneering                                                    Office of Science   Pioneering                                                  Office of Science
Science and                                                   U.S. Department     Science and                                                 U.S. Department
Technology                                                            of Energy   Technology                                                          of Energy




Links                                                                             Input and Output links
 A link is a type of field, and is one of
                                                                                  may be...numeric value, eg:
                                                                                     Constant
                                                                                       0
    Input link                                                                               3.1415926536
       Fetches data                                                                          1.6e-19
    Output link                                                                          Hardware link
       Writes data                                                                           A hardware I/O signal selector, the format of which depends on
    Forward link                                                                             the device support layer
       Points to the record to be processed once this record finishes                    Process Variable link — the name of a record, which at run-time
       processing                                                                        is resolved into
                                                                                             Database link
                                                                                                Named record is in this IOC
                                                                                             Channel Access link
                                                                                                Named record not found in this IOC


Pioneering                                                    Office of Science   Pioneering                                                  Office of Science
Science and                                                   U.S. Department     Science and                                                 U.S. Department
Technology                                                            of Energy   Technology                                                          of Energy




                                                                                                                                                                  5
Hardware links
VME_IO         #Cn Sn @parm
                                                                                    Database links
                       Card, Signal
                                                                                    These comprise:
INST_IO        @parm
                                                                                          The name of a record in this IOC
CAMAC_IO       #Bn Cn Nn An Fn @parm                                                       myDb:myRecord
                       Branch, Crate, Node, Address, Function                             An optional field name
AB_IO          #Ln An Cn Sn @parm                                                          .VAL (default)
        or     #Ln Pn Cn Sn Fn @parm                                                      Process Passive flag
                       Link, Adaptor, Card, Signal, Flag                                   NPP (default)
GPIB_IO        #Ln An @parm                                                                PP
                       Link, Address                                                      Maximize Severity flag
BITBUS_IO      #Ln Nn Pn Sn @parm                                                          NMS (default)
                       Link, Node, Port, Signal                                            MS
BBGPIB_IO      #Ln Bn Gn @parm
                                                                                    For example:
                       Link, Bitbus Address, GPIB Address                                M1:current.RBV NPP MS
VXI_IO         #Vn Cn Sn @parm
        or     #Vn Sn @parm                                                            NB: An input database link with PP set that is pointing to an asynchronous
                       Frame, Slot, Signal                                             input record will not wait for the new value from that record

 Pioneering                                                     Office of Science    Pioneering                                                                      Office of Science
 Science and                                                    U.S. Department      Science and                                                                     U.S. Department
 Technology                                                             of Energy    Technology                                                                              of Energy




Channel Access links                                                                Link flag summary
   Specified like a database link
   Name specifies a record not found in this IOC                                      Type                      Input Links                            Output Links
   Use Channel Access protocol to communicate with remote IOC                           DB         .PP or .NPP                             .PP or .NPP
   May include a field name (default .VAL)                                                         .MS or .NMS                             .MS or .NMS
   PP Link flags are ignored:                                                           CA         Always .NPP                             .PP behavior of destination field.
       Input links are always NPP                                                                  .MS or .NMS                             Always .NMS
       Output links follow PP attribute of destination field                                       .CA to force link type.                 .CA to force link type.
       This behaviour is identical to all other CA clients                                         .CP to process this record on change.
   MS Link flags apply to Input links:                                                             .CPP is like .CP but only process if
                                                                                                   SCAN=Passive
       Input links honour a given NMS (default) or MS flag
       Output links are always NMS
   Additional flags for CA links
    CA      Forces a “local” link to use CA
    CP      On input link, process this record on CA monitor event
    CPP     Like CP but only process if SCAN is Process Passive
                                                                                    Chapter 5 of the IOC Application Developer’s Guide covers record links and
                                                                                    scanning in detail, and is worth reading.

 Pioneering                                                     Office of Science    Pioneering                                                                      Office of Science
 Science and                                                    U.S. Department      Science and                                                                     U.S. Department
 Technology                                                             of Energy    Technology                                                                              of Energy




                                                                                                                                                                                         6
Device Support                                                                   Synchronous vs Asynchronous I/O
                                                                                        EPICS rules do not allow device support to busy-wait (delay
       Records do not access hardware directly                                          record processing while waiting for the results of a slow I/O
       The Device Support layer performs I/O operations on request                      operation)
       A particular device support provides I/O for a single record                         Fast I/O can be handled synchronously
       type                                                                                 Slow operations must operate asynchronously
       The DTYP field determines which device support to use                            Register-based VME cards usually give an immediate
       The device support selected determines the format of the link                    response: synchronous
       (INP or OUT field) containing device address information                         When called, synchronous device support performs all I/O
       Adding new device support does not require change to the                         before returning
       record software                                                                  Serial and most I/O field-bus devices take a long time (>10ms)
       Device support may call other software to do work for it (Driver                 to return data: asynchronous
       Support)                                                                         Asynchronous device support starts I/O when record calls it,
                                                                                        flags it as incomplete by setting PACT true before returning
                                                                                        Once results are available (CPU interrupt), device support calls
                                                                                        the record’s process routine which finishes the operation
Pioneering                                                   Office of Science   Pioneering                                                 Office of Science
Science and                                                  U.S. Department     Science and                                                U.S. Department
Technology                                                           of Energy   Technology                                                         of Energy




Soft Device Support                                                              Forward links
    “Hard” Input and Output records perform hardware I/O via device
    support
                                                                                        Usually a Database link, referring to a record in same IOC
    “Soft” records access data from other records via DB or CA links
    2 or 3 kinds of support are provided in recent R3.14 releases:                      Forward linking via Channel Access is possible, must explicitly
                                                                                        name the PROC field of the remote record
       Soft Channel
           Get/Put VAL through link, no units conversion preformed                      No flags (PP, NMS etc.)
       Async Soft Channel (new, for output records only)                                Destination record is only processed if it has
           Put VAL through CA link, no conversions, wait for completion                  SCAN = Passive
       Raw Soft Channel                                                                 Does not pass a value, just causes subsequent processing
           Inputs
                Get RVAL via input link
                Convert RVAL to VAL (record-type specific)
              Outputs
                Convert VAL to RVAL (record-type specific)
                Put RVAL to output link

Pioneering                                                   Office of Science   Pioneering                                                 Office of Science
Science and                                                  U.S. Department     Science and                                                U.S. Department
Technology                                                           of Energy   Technology                                                         of Energy




                                                                                                                                                                7
Processing chains                               Which record is never processed?




Pioneering                  Office of Science   Pioneering                                                     Office of Science
Science and                 U.S. Department     Science and                                                    U.S. Department
Technology                          of Energy   Technology                                                             of Energy




Which record is processed                       The PACT field
twice?                                                 Every record has a boolean run-time field called PACT (Process
                                                       Active)
                                                       PACT breaks loops of linked records
                                                       It is set to ‘true’ early in the act of processing the record
                                                            PACT is true whenever a link in that record is used to get/put a
                                                            value
                                                       PACT is set to false after record I/O and forward link processing
                                                       are finished
                                                       A PP link can never make a record process if it has PACT true
                                                              Input links take the current value
                                                              Output links just put their value



Pioneering                  Office of Science   Pioneering                                                     Office of Science
Science and                 U.S. Department     Science and                                                    U.S. Department
Technology                          of Energy   Technology                                                             of Energy




                                                                                                                                   8
What happens here?                                                                  Preventing records from
                                                                                    processing be able to stop an individual record from
                                                                                       It is useful to
                                                                                            processing on some condition
                                                                                            Before record-specific processing is called, a value is read
                                                                                            through the SDIS input link into DISA
                                                                                            If DISA=DISV, the record will not be processed
                                                                                            A disabled record may be put into an alarm by giving the
                                                                                            desired severity in the DISS field
                                                                                            The FLNK of a disabled record is never triggered




Pioneering                                                      Office of Science    Pioneering                                                 Office of Science
Science and                                                     U.S. Department      Science and                                                U.S. Department
Technology                                                              of Energy    Technology                                                         of Energy




How are records given CPU                                                           What could go wrong
time? IOC tasks are used:
  Several
                                                                                    here?
       callback (3 priorities) — I/O Interrupt
       scanEvent — Soft Event
       scanPeriod — Periodic
           A separate task is used for each scan period
           Faster scan rates are given a higher task priority (if supported by
           the IOC’s Operating System)
       Channel Access tasks use lower priority than record
       processing
           If a CPU spends all its time doing I/O and record processing, you
           may be unable to control or monitor the IOC via the network



Pioneering                                                      Office of Science    Pioneering                                                 Office of Science
Science and                                                     U.S. Department      Science and                                                U.S. Department
Technology                                                              of Energy    Technology                                                         of Energy




                                                                                                                                                                    9
Lock-sets                                                                             Alarms
                                                                                             Every record has the fields
   Prevent a record from being processed simultaneously from                                  SEVR Alarm Severity
   two scan tasks                                                                                    NONE, MINOR, MAJOR, INVALID
   A lock-set is a group of records interconnected by database                                  STAT Alarm Status (reason)
   links:                                                                                            READ, WRITE, UDF, HIGH, LOW, STATE, COS, CALC, DISABLE,
       Output links                                                                                   etc.
       Forward links                                                                         Most numeric records check VAL against HIHI, HIGH, LOW and
       Input links which are PP or MS                                                        LOLO fields after the value has been determined
       Any link transporting an Array                                                        The HYST field prevents alarm chattering
   Lock-sets are determined automatically by the IOC at start-up,                            A separate severity can be set for each numeric limit (HHSV,
   or whenever a database link is added, deleted or modified                                 HSV, LSV, LLSV)
 You can split a lock set with                                                               Discrete (binary) records can raise alarms on entering a
                                                                                             particular state, or on a change of state (COS)
   Channel Access links, using CA flag
   Database links which are both NPP and NMS
Pioneering                                                        Office of Science   Pioneering                                                                          Office of Science
Science and                                                       U.S. Department     Science and                                                                         U.S. Department
Technology                                                                of Energy   Technology                                                                                  of Energy




Change notification: Monitor                                                          Breakpoint Tables                35


deadbands when clients which are monitoring a
  Channel Access notifies
  numeric record
                                                                                                                       30
                                                                                                                       25




                                                                                                    Attenuation (db)
                                                                                                                       20
              VAL changes by more than the value in field:
                                                                                                                       15
              MDEL Value monitors                                                                                      10

              ADEL Archive monitors                                                                                    5
                                                                                                                       0
              Record’s Alarm Status changes                                                                                 0   500   1000               1500   2000   2500

              HYST Alarm hysteresis                                                                                                          A/D Units


              Analogue Input record provides smoothing filter to reduce input
              noise (SMOO)




Pioneering                                                        Office of Science   Pioneering                                                                          Office of Science
Science and                                                       U.S. Department     Science and                                                                         U.S. Department
Technology                                                                of Energy   Technology                                                                                  of Energy




                                                                                                                                                                                              10
Simulation                                                                      Access Security
                                                                                  A networked control system must have the ability to enforce
        Input and output record types often allow simulation of                   security rules
        hardware interfaces
                                                                                      Who can do what from where, and when?
          SIML Simulation mode link
          SIMM Simulation mode value                                              In EPICS, security is enforced by the CA server (typically the
                                                                                  IOC).
          SIOL Simulation input link
                                                                                  A record is placed in the Access Security Group named in its
          SIMS Simulation alarm severity
                                                                                  ASG field
        Before using its device support, a record reads SIMM through
                                                                                      DEFAULT is used if no group name is given
        the SIML link
                                                                                  Rules for each group determine whether a CA client can read or
        If SIMM=YES, device support is ignored; record I/O uses the
                                                                                  write to records in the group, based on
        SIOL link instead
                                                                                      Client user ID
        An alarm severity can be set whenever simulating, given by
        SIMS field                                                                    Client IP address
                                                                                      Access Security Level of the field addressed
                                                                                      Values read from the database
 Pioneering                                                 Office of Science   Pioneering                                            Office of Science
 Science and                                                U.S. Department     Science and                                           U.S. Department
 Technology                                                         of Energy   Technology                                                    of Energy




Access Security Configuration
   Security rules are loaded from an Access Security
File
   Configuration File, for example:
           UAG(users) {user1, user2}
           HAG(hosts) {host1, host2}
           ASG(DEFAULT) {
               RULE(1, READ)
               RULE(1, WRITE) {
                   UAG(users)
                   HAG(hosts)
               }
           }
        If no security file is loaded, Security will be turned off and
        nothing refused
        For more details and the rule syntax, see Chapter 8 of the IOC
        Application Developers Guide


 Pioneering                                                 Office of Science
 Science and                                                U.S. Department
 Technology                                                         of Energy




                                                                                                                                                          11

More Related Content

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Database

  • 1. Outline Records Fields and field types Record Scanning What is an EPICS Input and Output record types Database? Links, link address types Connecting records together Protection mechanisms Andrew Johnson Alarms, deadbands, simulation and security October 26, 2004 Argonne National Laboratory A U.S. Department of Energy Office of Science Laboratory Pioneering Office of Science Office of Science U.S. Department of Energy Operated by The University of Chicago Science and U.S. Department Technology of Energy Database = Records + Fields + Record Activity Links system using EPICS will contain one or more IOCs A control Records are active — they can do things: Each IOC loads one or more Databases telling it what to do Get data from other records or from hardware A Database is a collection of Records of various types Perform calculations A Record is an object with: Check values are in range & raise alarms A unique name Put data to other records or to hardware A behaviour defined by its record type (class) Activate or disable other records Controllable properties (fields) Wait for hardware signals (interrupts) Optional associated hardware I/O (device support) What a record does depends upon its record type and the Links to other records settings of its fields No action occurs unless a record is processed Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy 1
  • 2. How is a Record One view of a Record implemented? both data storage and pointers to record A ‘C’ structure with type information A record definition within a database provides Record name The record’s type Values for each design field A record type provides Definitions of all the fields Code which implements the record behaviour New record types can be added to an application as needed Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy A graphical view of a Record Another graphical view of a Record The small CapFast symbol for an Analogue Output record Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy 2
  • 3. The IOC’s view Fields are for... The full .db file entry for an Analogue Output Record Defining record(ao,"DemandTemp") { field(OIF,"Full") field(HHSV,"NO_ALARM") What causes a record to process field(DESC,"Temperature") field(LLSV,"NO_ALARM") field(PREC,"1") Where to get/put data from/to field(ASG,"") field(LINR,"NO field(HSV,"NO_ALARM") field(SCAN,"Passive") CONVERSION") field(LSV,"NO_ALARM") How to turn raw I/O data into a numeric engineering value field(PINI,"NO") field(EGUF,"100") field(HYST,"0.0e+00") field(PHAS,"0") field(EGUL,"0") field(ADEL,"0.0e+00") Limits indicating when to report an alarm field(EGU,"Celcius") field(EVNT,"0") field(DRVH,"100") field(MDEL,"0.0e+00") When to notify value changes to a client monitoring the record field(DTYP,"VMIC 4100") field(SIOL,"") field(DISV,"1") field(DRVL,"0") field(SIML,"") A Processing algorithm field(SDIS,"") field(HOPR,"80") field(SIMS,"NO_ALARM") field(DISS,"NO_ALARM") field(LOPR,"10") field(IVOA,"Continue Anything else which needs to be set for each record of a given type field(PRIO,"LOW") field(HIHI,"0.0e+00") normally") Holding run-time data field(FLNK,"") field(LOLO,"0.0e+00") field(IVOV,"0.0e+00") field(OUT,"#C0 S0") field(HIGH,"0.0e+00") } Input or output values field(LOW,"0.0e+00") field(OROC,"0.0e+00") Alarm status, severity and acknowledgements field(DOL,"") field(OMSL,"supervisory") Processing timestamp This shows only the design fields, there are other fields which Other data for internal use are used only at run-time Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy Field types All Records have these fields Fields can contain Design fields Integers NAME 60 Character unique name (using more than 28 char’s can cause problems) char, short or long DESC 28 Character description ASG Access security group signed or unsigned SCAN Scan mechanism Floating-point numbers PHAS Scan order (phase) float or double PINI Process at IOC initialization? Strings PRIO Scheduling priority SDIS Scan disable input link maximum useful length is 40 characters DISV Scan disable value Menu choices DISS Disabled severity select one from up to 16 strings FLNK Forward link stored as a short integer Run-time fields Links PROC Force processing PACT Process active to other records in this or other IOCs STAT Alarm status to hardware signals (device support) SEVR Alarm severity provide a means of getting or putting a value TPRO Trace processing Other private data UDF Set if record value undefined not directly accessible TIME Time when last processed Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy 3
  • 4. Record Scanning Input records often have these INP Input link SCAN field is a menu choice from Periodic — 0.1 seconds .. 10 seconds fields DTYP RVAL Device type Raw data value I/O Interrupt (if device supports this) VAL Engineering value Soft event — EVNT field LOPR Low operator range HOPR High operator range Passive (default) Analogue I/O records have these fields: The number in the PHAS field allows processing order to be set EGU Engineering unit string within a scan LINR Unit conversion control: No conversion, Linear, Slope, Records with PHAS=0 are processed first breakpoint table name Then those with PHAS=1 , PHAS=2 etc. EGUL Low engineering value EGUF High engineering value Records with PINI=YES are processed once at startup ESLO Unit conversion slope PRIO field selects Low/Medium/High priority for Soft event and EOFF Unit conversion offset I/O Interrupts A record is also processed whenever any value is written to its PROC field Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy Periodic Input Interrupt Input Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy 4
  • 5. Output records link OUT Output often have these Passive Output Device type fields VAL DTYP Engineering value RVAL Raw output value DOL Input link to fetch output value OMSL Output mode select: Supervisory, Closed Loop LOPR Low operator range HOPR High operator range Analogue outputs also have these fields: OROC Output rate of change OIF Incremental or Full output OVAL Output value DRVH Drive high limit DRVL Drive low limit IVOA Invalid output action IVOV Invalid output value RBV Read-back value Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy Links Input and Output links A link is a type of field, and is one of may be...numeric value, eg: Constant 0 Input link 3.1415926536 Fetches data 1.6e-19 Output link Hardware link Writes data A hardware I/O signal selector, the format of which depends on Forward link the device support layer Points to the record to be processed once this record finishes Process Variable link — the name of a record, which at run-time processing is resolved into Database link Named record is in this IOC Channel Access link Named record not found in this IOC Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy 5
  • 6. Hardware links VME_IO #Cn Sn @parm Database links Card, Signal These comprise: INST_IO @parm The name of a record in this IOC CAMAC_IO #Bn Cn Nn An Fn @parm myDb:myRecord Branch, Crate, Node, Address, Function An optional field name AB_IO #Ln An Cn Sn @parm .VAL (default) or #Ln Pn Cn Sn Fn @parm Process Passive flag Link, Adaptor, Card, Signal, Flag NPP (default) GPIB_IO #Ln An @parm PP Link, Address Maximize Severity flag BITBUS_IO #Ln Nn Pn Sn @parm NMS (default) Link, Node, Port, Signal MS BBGPIB_IO #Ln Bn Gn @parm For example: Link, Bitbus Address, GPIB Address M1:current.RBV NPP MS VXI_IO #Vn Cn Sn @parm or #Vn Sn @parm NB: An input database link with PP set that is pointing to an asynchronous Frame, Slot, Signal input record will not wait for the new value from that record Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy Channel Access links Link flag summary Specified like a database link Name specifies a record not found in this IOC Type Input Links Output Links Use Channel Access protocol to communicate with remote IOC DB .PP or .NPP .PP or .NPP May include a field name (default .VAL) .MS or .NMS .MS or .NMS PP Link flags are ignored: CA Always .NPP .PP behavior of destination field. Input links are always NPP .MS or .NMS Always .NMS Output links follow PP attribute of destination field .CA to force link type. .CA to force link type. This behaviour is identical to all other CA clients .CP to process this record on change. MS Link flags apply to Input links: .CPP is like .CP but only process if SCAN=Passive Input links honour a given NMS (default) or MS flag Output links are always NMS Additional flags for CA links CA Forces a “local” link to use CA CP On input link, process this record on CA monitor event CPP Like CP but only process if SCAN is Process Passive Chapter 5 of the IOC Application Developer’s Guide covers record links and scanning in detail, and is worth reading. Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy 6
  • 7. Device Support Synchronous vs Asynchronous I/O EPICS rules do not allow device support to busy-wait (delay Records do not access hardware directly record processing while waiting for the results of a slow I/O The Device Support layer performs I/O operations on request operation) A particular device support provides I/O for a single record Fast I/O can be handled synchronously type Slow operations must operate asynchronously The DTYP field determines which device support to use Register-based VME cards usually give an immediate The device support selected determines the format of the link response: synchronous (INP or OUT field) containing device address information When called, synchronous device support performs all I/O Adding new device support does not require change to the before returning record software Serial and most I/O field-bus devices take a long time (>10ms) Device support may call other software to do work for it (Driver to return data: asynchronous Support) Asynchronous device support starts I/O when record calls it, flags it as incomplete by setting PACT true before returning Once results are available (CPU interrupt), device support calls the record’s process routine which finishes the operation Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy Soft Device Support Forward links “Hard” Input and Output records perform hardware I/O via device support Usually a Database link, referring to a record in same IOC “Soft” records access data from other records via DB or CA links 2 or 3 kinds of support are provided in recent R3.14 releases: Forward linking via Channel Access is possible, must explicitly name the PROC field of the remote record Soft Channel Get/Put VAL through link, no units conversion preformed No flags (PP, NMS etc.) Async Soft Channel (new, for output records only) Destination record is only processed if it has Put VAL through CA link, no conversions, wait for completion SCAN = Passive Raw Soft Channel Does not pass a value, just causes subsequent processing Inputs Get RVAL via input link Convert RVAL to VAL (record-type specific) Outputs Convert VAL to RVAL (record-type specific) Put RVAL to output link Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy 7
  • 8. Processing chains Which record is never processed? Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy Which record is processed The PACT field twice? Every record has a boolean run-time field called PACT (Process Active) PACT breaks loops of linked records It is set to ‘true’ early in the act of processing the record PACT is true whenever a link in that record is used to get/put a value PACT is set to false after record I/O and forward link processing are finished A PP link can never make a record process if it has PACT true Input links take the current value Output links just put their value Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy 8
  • 9. What happens here? Preventing records from processing be able to stop an individual record from It is useful to processing on some condition Before record-specific processing is called, a value is read through the SDIS input link into DISA If DISA=DISV, the record will not be processed A disabled record may be put into an alarm by giving the desired severity in the DISS field The FLNK of a disabled record is never triggered Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy How are records given CPU What could go wrong time? IOC tasks are used: Several here? callback (3 priorities) — I/O Interrupt scanEvent — Soft Event scanPeriod — Periodic A separate task is used for each scan period Faster scan rates are given a higher task priority (if supported by the IOC’s Operating System) Channel Access tasks use lower priority than record processing If a CPU spends all its time doing I/O and record processing, you may be unable to control or monitor the IOC via the network Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy 9
  • 10. Lock-sets Alarms Every record has the fields Prevent a record from being processed simultaneously from SEVR Alarm Severity two scan tasks NONE, MINOR, MAJOR, INVALID A lock-set is a group of records interconnected by database STAT Alarm Status (reason) links: READ, WRITE, UDF, HIGH, LOW, STATE, COS, CALC, DISABLE, Output links etc. Forward links Most numeric records check VAL against HIHI, HIGH, LOW and Input links which are PP or MS LOLO fields after the value has been determined Any link transporting an Array The HYST field prevents alarm chattering Lock-sets are determined automatically by the IOC at start-up, A separate severity can be set for each numeric limit (HHSV, or whenever a database link is added, deleted or modified HSV, LSV, LLSV) You can split a lock set with Discrete (binary) records can raise alarms on entering a particular state, or on a change of state (COS) Channel Access links, using CA flag Database links which are both NPP and NMS Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy Change notification: Monitor Breakpoint Tables 35 deadbands when clients which are monitoring a Channel Access notifies numeric record 30 25 Attenuation (db) 20 VAL changes by more than the value in field: 15 MDEL Value monitors 10 ADEL Archive monitors 5 0 Record’s Alarm Status changes 0 500 1000 1500 2000 2500 HYST Alarm hysteresis A/D Units Analogue Input record provides smoothing filter to reduce input noise (SMOO) Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy 10
  • 11. Simulation Access Security A networked control system must have the ability to enforce Input and output record types often allow simulation of security rules hardware interfaces Who can do what from where, and when? SIML Simulation mode link SIMM Simulation mode value In EPICS, security is enforced by the CA server (typically the IOC). SIOL Simulation input link A record is placed in the Access Security Group named in its SIMS Simulation alarm severity ASG field Before using its device support, a record reads SIMM through DEFAULT is used if no group name is given the SIML link Rules for each group determine whether a CA client can read or If SIMM=YES, device support is ignored; record I/O uses the write to records in the group, based on SIOL link instead Client user ID An alarm severity can be set whenever simulating, given by SIMS field Client IP address Access Security Level of the field addressed Values read from the database Pioneering Office of Science Pioneering Office of Science Science and U.S. Department Science and U.S. Department Technology of Energy Technology of Energy Access Security Configuration Security rules are loaded from an Access Security File Configuration File, for example: UAG(users) {user1, user2} HAG(hosts) {host1, host2} ASG(DEFAULT) { RULE(1, READ) RULE(1, WRITE) { UAG(users) HAG(hosts) } } If no security file is loaded, Security will be turned off and nothing refused For more details and the rule syntax, see Chapter 8 of the IOC Application Developers Guide Pioneering Office of Science Science and U.S. Department Technology of Energy 11