Presentation is loading. Please wait.

Presentation is loading. Please wait.

Soft-IOC Based Alarm Handler Pam Gurd May 25, 2006.

Similar presentations


Presentation on theme: "Soft-IOC Based Alarm Handler Pam Gurd May 25, 2006."— Presentation transcript:

1 Soft-IOC Based Alarm Handler Pam Gurd May 25, 2006

2 Why? Wanted to be able to incorporate alarm summaries in edm screens And to call edm screens from alarm screens.

3 Where? Standard soft IOC Alarm_softIOC/Devel…/commonApp/ contains everything needed to produce the individual apps. src contains the scripts that follow. Db contains the database templates. srcOpi holds the common alarm screens and the templates to be used to build specific alarm screens.

4 Where? continued iocBoot/ics-ioc-linux-alrm soft IOC for common stuff (now alarmModes, later summaries of everything.) Alarm_softIOC/Devel…/alarmLists contains the alarm configuration files. Presently defined: –ICS_Ctl_IOC_list.txt – IOC list –PPS_ICS_Chmk_list.txt – chipmunk list

5 What? Set of scripts to create soft IOCs from alarm configuration files. –make_all_alarm_apps.sh – calls make_alarm_app for each configuration file –make_alarm_app.sh – makes an alarm app ( App) and an iocBoot directory for a soft IOC ( - -ioc-linux ) using the standard makeBaseApp templates. Notice that it’s very SNS-name-centric

6 What’s in the application? Scripts define a soft IOC from an alarm configuration file –make_db_files.pl – makes all the EPICS database files: summaries, disable bits, timestamps, alarm logs, etc. –make_screen_substitutions.pl – makes a substitutions file to be used to create the alarm edm screen. –make_alarm_seqs.pl – makes the EPICS image file including the sequence to handle the alarm log –make_arreqs.pl – makes the archive req files (includes, mostly, the alarm log.) –make_ioc.pl – makes the autosave.req file and adds the databases, sequences and the autosave.req to the soft IOC startup command script.

7 Other scripts Utilities for scripts to create soft IOCs from alarm configuration files. –get_alarm_app.pl – translates S, SS and N to sSsN for app name (eg, S=PPS, SS=ICS, N=_Chmk translates to ppsICS_ChmkApp) (We’ll call that sSsNApp later on.) –get_ioc_name.pl – translates S, SS and N to - -ioc-alrm, converting “_” to “-” for app name (eg, S=PPS, SS=ICS, N=_Chmk translates to pps-ics-ioc-linux-alrm-chmk)

8 Configuration File Top-level Summary definition Mid-level Summary definitions (up to 12 for each top-level summary) PV lists for each (up to 12 to each mid- level summary) + all specifications needed to build all the goodies described previously

9 Configuration File Format – General Notes Everything is defined using = Keyword examples: TOP_S, TOP_SS, TOP_N, S, SS, N, PV, EDL, EDL_MACROS Generally, white space is ignored. Order matters. For example, TOP_S, TOP_SS, and TOP_N have to be defined before the S, SS and N of the first mid-level summary to be included. Some strings have to be enclosed in quotes (eg. EDL_MACROS=“"M=1“) Comment lines starting with “#” are ignored.

10 Configuration File: Top-level Summary definition TOP_S – usual SNS system –eg TOP_S=PPS TOP_SS - subsystem –eg TOP_SS=ICS TOP_N – device instance –eg TOP_N=_Chmk These are used for the App name, the soft IOC name, and the PV names for the top-level summary and alarm log. Must appear before the first mid-level summary keyword.

11 Configuration File: Mid-level Summary definition Up to 12 mid-level summaries for each top-level summary S – usual SNS system, eg S=PPS SS – subsystem, eg SS=Lin N – device instance, eg N=_ChmkA EDL – edm screen filename for details, eg EDL=pps_frntend_phase1_3 MODE – PV to define machine mode. Eg, MODE=Tgt_ICS:Summary:MachMode MODE_DESC – Short string to describe machine mode; eg, MODE_DESC=Tgt These are used for the PV names and configuration parameters for the mid-level summary. All keywords for the mid-level summary must appear before the next S keyword.

12 Configuration File: PV parameters (up to 12 PVs for each mid-level summary) PV – EPICS PV name –eg PV=ICS:IOC_linux1:HBtNLOK_FE1 EDL and EDL_MACROS as for mid-level summaries DESC – text description of alarm –eg DESC="Front End IOC 1"

13 WARNING Don’t edit the stuff “Under the hood” and then go back and run the script again. Your changes will be deleted.

14 How to Run the Script In $IOCTOP/Alarm_softIOC/ make alarm_apps Performs this command: commonApp/src/make_all_alarm_apps.sh creates an app for each *list.txt file in alarmLists. Or commonApp/src/make_alarm_app.sh alarmLists/ creates one app. Don’t forget the warning!

15 Under the Hood – EPICS Database Files (sSsNApp Db directory) alarmModes.db – Defines machine modes for mid-level summaries (loaded by the soft IOC ics-ioc-linux-alrm.) _ _Alarm.substitutions – defines records using the following VDCT templates: –alarmLatch.template –alarmLog.template –sumLatch.template –topSumLatch.template _ _ Alarm _top.db – records that are directly written by the script - -ioc-linux-alrm.substitutions – standard linuxStats soft IOC status.

16 Under the Hood – Top-Level Summary PVs _ :Summary :StsCurr – current highest severity of included PVs (masked as specified in disable bits) _ :Summary :StsLtch – summary of all lower-level latches _ :Summary :StsNotOK– actual current highest severity of included PVs, not masked by disable bits _ :Summary :ClrCmd – command to clear latches, including all lower-level latches _ :Summary :Ltch – highest alarm severity since last latch clear command _ :Summary :LtchCh – 1 when the latch is becoming set _ :Summary :LtchTS – timestamp the last time the Latch value changed. _ :Summary :DisSumSts – summary of all lower level disables

17 Under the Hood – Logging PVs (for each Top-Level Summary) _ :Summary :AlarmLog – Description of last PV of which the alarm severity increased (masked by disable bits) _ :Summary :AlarmLogTime – the time that the alarm severity increased _ :Summary : AlarmLogSevr – the new alarm severity Similarly, _ :Summary :NotOKLog logs the unmasked alarm PV, and _ :Summary_ioc:AlarmLtchLog logs the latch state Each Log PV is rolled into a set of PVs with a number from 00 to 19 appended to the PV name so the last 20 alarms can be viewed on the Alarm Log screen.

18 Under the Hood – Mid-Level Summary PVs _ :Summary :StsCurr – current highest severity of included PVs (masked as specified in disable bits) _ :Summary :StsLtch – summary of all lower-level latches _ :Summary :StsNotOK– actual current highest severity of included PVs, not masked by disable bits _ :Summary :LtchTS – timestamp the last time the Latch value changed. _ :Summary :Ltch – highest alarm severity since last latch clear command. _ :Summary :ClrCmd – command to clear latches, including all lower-level latches _ :Summary :Dis – disable at this level _ :Summary :DisSumSts – summary of all lower level disables and the disable at this level _ :Summary :StsDis – summary of all lower level disables _ :Summary :ModeSts – state of mode status PV _ :Summary :LtchCh – 1 when the latch severity increases.

19 Under the Hood – for each PV AlarmSts – current severity, masked by disable bits as specified. AlarmLtch – highest alarm severity since last latch clear command AlarmNotOK – actual current severity, not masked by disable bits AlarmDis – disable alarm for this PV AlarmCnt – counts how many times in a row the PV severity has been greater than the latched severity value. Used to delay latch. AlarmLtchCh – 1 when the latch changes AlarmLtchTS – timestamp the last time the Latch value changed AlarmStsCalc – using the “OUT” of this calcout allows unconnected PVs to be masked. AlarmOKCalc – similarly to the above, but for unmasked value. (?) This might look like a lot, but PVs in soft IOCs are pretty cheap. Only 1 CA connection to each real PV.

20 Under the Hood – Alarm Log Sequence (sSsNApp/src directory) The sequence _ _alarmLogSeq.st is created to make alarm logs for edm display. –The PV descriptions go there. –Called 3 times, to make 3 logs corresponding to current status after disables are applied, latched status and unmasked status. Plus Include.dbd and Makefile in support.

21 Under the Hood – Archive reqs (sSsNApp/srcCfg/arCfg directory) _ _Alarm _Summary.arReq to specify archiving the alarm logs.

22 edm Screens – Overall Summary This one isn’t getting generated automatically yet.

23 edm Screens – Top-Level Summary (in sSsNApp/srcOpi directory) Click for details (Alarm details or edm screen from system) Click to change disable status This circle includes current status, latch status, disable status and unmasked status. You can copy it to your own screen.

24 edm Screens – Mid-Level Summary Click for details (Alarm details or edm screen from system) Click to change disable status Here’s another circle you could copy to your own screen. Click for alarm configuration details

25 edm Screens – Alarm Circle Legend

26 edm Screens – Alarm Log

27 edm Screens – Alarm Configuration (needs work)

28 iocBoot Directory ics-ioc-linux-alrm soft IOC for common stuff (now alarmModes, later summaries of everything.) iocBoot/ - -ioc-linux-alrm directory –“_” in are changed to “-”. –eg pps-ics-ioc-linux-alrm-chmk –contains - -ioc-linux-alrm.req (autosave req file for alarm parameters) and - -ioc-linux- alrm _st.cmd (startup command script.)

29 Future Developments Configuration screen needs work, and need different screens for different record types. Create top-level summaries of everything. Automatically generate a top-level screen. For Cryo, need to add latch delay to configuration. More examples to find other needs and shortcomings (and, hopefully, because they’d be useful.) Allow inclusion of PVs in more than one summary. Remove 12 PV limit. Link with Oracle database for configuration. Provide a way for Ops to do configuration and boot soft IOCs.


Download ppt "Soft-IOC Based Alarm Handler Pam Gurd May 25, 2006."

Similar presentations


Ads by Google