Lab - PowerPoint PPT Presentation

About This Presentation
Title:

Lab

Description:

1999/Ph 514: Lab #2 : IOC Database. US. Particle. Accelerator. School. EPICS ... Indicate this on the medm display with a yellow box around the set point text entry. ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 13
Provided by: advan71
Learn more at: https://epics.anl.gov
Category:
Tags: lab

less

Transcript and Presenter's Notes

Title: Lab


1
Lab 2IOC Database

2
Lab 2IOC Database
  • Real Life Example 2 After returning from your
    vacation, you have an e-mail requesting the
    following enhancements to the LINAC Control
    System
  • Add Beam Transport Efficiency calculations (and
    PVs) for FC1 and FC2
  • Provide a PV that allows the operator to enter
    their name. Display this PV on the medm display
    labeled Operator In Charge
  • Turn off gun and set cathode current to 0 if
    cathode temperature exceeds 180 degrees
  • Dont allow the Beam On button to be activated
    unless the cathode temperature is within range
  • Define an Open Access PV which gets its state
    from a toggle switch
  • Define appropriate records to keep all power
    supplies at 0 current when in Open Access
  • Turn on a warning light when beam reaches either
    faraday cup. Reflect the amount of beam hitting
    the faraday cup on the analog gauge.

3
New PVs
  • You can either create a new database file for
    your PVs or add them to
  • /ioc/linac/linacApp/Db/xxLinacSim.db
  • To start jdct
  • cd /ioc/linac/linacApp/Db
  • jdct
  • Load database definition file
  • From file menu, Open ../../dbd/linacApp.dbd
  • Save edited (or new) database
  • From file menu, Save as ../linacApp/Db/_.db
  • If you created a new database, edit Makefile.Host
    and execute gnumake. You must also edit
  • /ioc/linac/iocBoot/ioclinac/st.cmd
  • to load the new database.

4
New PVs
  • Create Beam Transport Efficiency PVs for FC1 and
    FC2
  • Create a calc record studnt_FC1transportRatioM
    that provides the required calculation (FC1/CM1).
    Scan it periodically at 1 second.
  • Create a calc record studnt_FC2transportRatioM.
    that provides the required calculation (FC2/CM1).
    Use the .CP attributes on the input links to have
    it scan when necessary.
  • Add readouts for these PVs on the medm display
  • Provide a PV that allows the operator to enter
    their name. Display this PV on the medm display
    labeled Operator In Charge
  • Create a stringin record named studnt_OPoperator
    . Have the value initialize to None.
  • Create a text entry on the medm display for
    operator entry

5
Auto-shutdown - gun
  • Turn off gun and set cathode current to 0 if
    cathode temperature exceeds 180 degrees
  • Create a calcout record that monitors cathode
    temperature. When temperature exceeds 180
    degrees, have the calcout record force the
    processing of a sequence record that turns the
    gun off and sets the cathode current to 0.
  • NOTE APS is very careful to distinguish between
    equipment protective interlocks and prudent
    operating procedures. We do not rely on EPICS to
    perform equipment protective interlocks. The
    above example assumes that there is a hardwired
    interlock protecting the cathode at 190 degrees.

6
Beam On Inhibit
  • Dont allow the Beam On button to be activated
    unless the cathode temperature is within range
  • Create a calc record (studnt_cathodeTempCheck)
    whose value is 1 when the cathode temperature is
    within the appropriate range (140-160 degrees)
    and 0 when it is not within range.
  • Set the studnt_gunOnC.SDIS to fetch the above
    record. Set studnt_gunOnC.DISV to 0 to disable
    the record when the cathode temperature is out of
    range.
  • Does this work as you expect ?

7
Beam On Inhibit
  • Another approach
  • Copy studnt_gunOnC to a new PV
    studnt_gunOnRequestC
  • Set the following fields of studnt_gunOnRequestC
  • .FLNK to studnt_gunOnC
  • .SDIS to studnt_cathodeTempCheck.VAL
  • .DISV to 0
  • Change the following fields of studnt_gunOnC
  • .DOL to studnt_gunOnRequestC
  • .OMSL to closed_loop
  • .SDIS to NULL
  • .DISV to 1
  • Use studnt_gunOnRequestC as the operator control
    on the medm display, but still monitor
    studnt_gunOnC
  • Does this work like you want it to ?
  • What happens if the beam is on and the cathode
    temperature decreases ?

8
Beam On Inhibit
  • Yet another approach Use the Mask mode of a
    sequence record to perform a conditional set of
    operations (i.e turn gun on or reset the request)
  • Define a calc record (studnt_gunOnRequestCheck)
    which yields the following result
  • If studnt_gunOnRequestC is 0, result is 2
  • If studnt_gunOnRequestC is 1 and
    studnt_cathodeTempCheck is 0, result 1
  • If studnt_gunOnRequestC is 1 and
    studnt_cathodeTempCheck is 1, result 4
  • Set .FLNK to studnt_gunOnRequestSQ
  • Set studnt_gunOnRequestC.SDIS to NULL and
    studnt_gunOnRequestC.DISV to 1
  • Define a sequence record (studnt_gunOnRequestSQ)
    as follows
  • .SELM Mask, .SELL to studnt_gunOnRequestCheck.
    VAL
  • .DLY1 0.5, .DOL1 0, .LNK1 to
    studnt_gunOnRequestC (cancels request)
  • .DLY2 0, .DOL2 0, .LNK2 to studnt_gunOnC to
    0 (turns gun off)
  • .DLY3 0, .DOL3 1, .LNK3 to studnt_gunOnC to
    0 (turns gun on)

9
Open Access Mode
  • Add a PV to monitor an access mode switch
  • Create a bi record named studnt_accessMode.
  • .DTYP Bitbus Device
  • .INP L0 N1 P0 S0 _at_
  • .ZNAM Open Access , .ONAM No Access
  • Keep all power supplies at 0 current if toggle
    switch is in Open Access
  • Create a calcout record (studnt_psHoldOffCO)
    that forces the processing of a sequence record
    (studnt_psHoldOffSQ ) if the toggle switch is in
    the Open Access state.
  • Define the sequence record studnt_psHoldOffSQ to
    hold the set current of all power supplies to 0.
    Forward link to another sequence record that
    finishes the job. Decide on the appropriate way
    to process these records.

10
Beam Alert
  • Provide an indication on the I/O panel when beam
    reaches either faraday cup
  • Define a binary output record (studnt_beamPresent
    LedC) to turn on an LED
  • DTYP Bitbus Device
  • OUT L0 N1 P0 S3 _at_
  • ZNAM No Beam ONAM Beam On
  • Define an analog output record (studnt_beamPresen
    tMeterC) to drive the panel meter
  • DTYP Bitbus Device
  • OUT L0 N1 P0 S0 _at_
  • EGUF 20 EGUL 0
  • Define two calcout records to drive the above
    records based on the current present at the
    faraday cups.
  • EXTRA CHALLENGE Enhance the above
    implementation by blinking the light if the beam
    at the faraday cup exceeds 5 mA (Hint this can
    be done by adding one record).

11
Additional Database Exercises
  • Rate-of-change on ao record
  • Monitor studnt_BM1setCurrentC.OVAL (with medm
    or probe) while changing studnt_BM1setCurrentC.V
    AL .
  • Set studnt_BM1setCurrentC.OROC to 10. Set
    studnt_BM1setCurrentC.SCAN to '1 second'.
    Monitor studnt_BM1setCurrentC.OVAL again while
    changing studnt_BM1setCurrentC.VAL.
  • Create a record that indicates when
    studnt_BM1setCurrentC has not reached its
    setpoint (i.e. indicates that it is still
    ramping). Indicate this on the medm display with
    a yellow box around the set point text entry.
  • I/O Panel - (Make sure these don't interfere with
    the other uses of the I/O panel)
  • Create the necessary records so three LEDs on the
    I/O panel (0,1,2) count in binary while switch 0
    is on and stop counting when the switch is off.
  • Create the necessary records so the meter follows
    the potentiometer when all switches are on.

12
Additional Database Exercises
  • Implement Channel Access Security such that only
    studnt_ can control studnt_BM1setCurrentC.
  • Create an access security configuration file
    named CA_ACCESS in /ioc/iocBoot/ioclinac/.

UAG(users) studnt_ ASG(DEFAULT) RULE(1,
READ) RULE(1, WRITE)
ASG(SUPERUSER) RULE(1, READ) RULE(1,
WRITE) UAG(users)
  • Add the following lines in /ioc/iocBoot/ioclinac/
    st.cmd
  • cd startup
  • asSetFilename("CA_ACCESS")
  • Change studnt_BM1setCurrentC.ASG to SUPERUSER.
  • Add other security conditions as desired.
Write a Comment
User Comments (0)
About PowerShow.com