Using the Alarm Hander for Development on a Programmer Workstation

Instructions for Getting/Running the ALH with Your Working Version of the TCS

1. cd to your_TCSBuild_2014C_Location and execute ./ Run the TCS 2014C Build and subsystems as you would normally, except you also need to run the DDS.

2. In a different terminal window, cd to your_TCSBuild_2014C_Location.

3. Execute the ./ You need to run the alarm handler against the TCS 2014C build because the alarm handler has the capability (by pressing the process button "P" associated with the leaves of the ALH tree) of raising the TCS GUI related to the alarm issue. If you have not done the, then your environment variables will not be setup properly for this build, and you will be invoking (potentially) the wrong version of the GUI which will be displayed in yellow (warning). This should not be an issue at this time, but when you develop for 2014D, you will need to remember to do this. Note: there will be a new version of the alarm handler installed on the mountain BEFORE TCS Build 2014D, so do not put your 2014D DD variables into the alarm handler yet.

4. Now cd to your home directory (/home/yourNameHere) where you can check out the EPICS/ALH files from the repository. Sorry, this location is a restriction at this time.
svn co https://svn/repos/alh/trunk epics
This will create an epics subdirectory containing two more subdirectories described in the next section. Make sure you call the directory epics.

5. At this time you should be able to type, ALH, as it is on your path (/lbt/developers/bin/ALH). This script will run the IOC on your machine, and invoke the ALHGUI. When you execute ALH, it is putting the two ALH output files in /tmp. These files are ALH-default.alhAlarm and ALH-default.alhOpmod. The ALH is also reading the input ALH configuration file from yourHome/epics/LBTALHConfiguration directory. The ALH-default.alhConfig is discussed below. The ddChannelMap.cfg and tcs.db are also in play for the IOC.

ALH-default.alhConfig (and all the included files)

ALH-default.alhAlarm - tracks activated warning and alarms
ALH-default.alhOpmod - tracks the operator's actions using ALH

Explanation of the EPICS/ALH Files from the Repository

Your checkout from SVN consists of two directories which contain configuration, LBTALHConfiguration, and support files, LBTALHSupport.

LBTALHConfigure contains the following files which you are encouraged to examine. Each programmer will be changing Items 1 or 2, 4 and 5 for testing purposes. Items 3 and 6 should not be modified.
  1. ALH-SSS.alhConfig: TCS Subsystem configuration where SSS = AOS, ECS, etc.
  2. ALH-IIII.alConfig: LBT Instrument configuration where IIII = MODS, LUCI, etc.
  3. ALH-default.alhConfig: This is the master configuration file which "includes" all the previously discussed files.
  4. ddChannelMap.cfg: Mapping for TCS data dictionary variable to ALH variable and datatype.
  5. tcs.db: The database used by the ALH which contains the ALH variable name and the limits for warning and error (among other items). NOTE: The TCS Subsystem and Instrument ALH implementation is different. The TCS uses meta-data in that it does not send the actual values to the ALH, but rather it provides associated severity flags to the ALH. This means the ALH does not know actual variable values or the variable threshold limits. Since severity flags are used, the limits are set to Warning = 2 and Error = 1. This implementation was useful for using this same information for TCS GUI breadcrumb navigation. The Instruments provide the actual variable values with the variable warning and error limits currently hard-coded in the ALH tcs.db.
  6. ice.cfg: ICE configuration file needed at run-time which contains the IP where the IOC for the ALH is running. This is set to localhost for you.
LBTALHSupport directory contains a series of files named
  1. launch-SSS-gui where SSS = AOS, ECS, etc. As noted earlier, the process button "P" can invoke commands. Currently, the process button for the TCS leaves will invoke these files and execute the contents. For example, launch-pmcl-gui contains "PMCGUI left". For LBC, the process button invokes firefox and the LBC application.

Explanation of the Contents of the Files which Need to be Modified

A) ddChannelMap.cfg
This ASCII file contains the TCS data dictionary item to be read, the ALH name for the item, and the datatype on a single line.
- follow the style of the current file contents
- follow the style of the current ALH variable names
- keep all items for a subsystem or instrument grouped together
- make your variable a short (severity flag) or a float datatype for now
- do not insert blank lines, comments, or any other odd characters

B) tcs.db
This file contains a record for each ALH variable being read. For TCS variables which represent severity flags, the implementation in this file
is simple:
record(ao, "ecs:airCompr:CV0408") <== Your variable here
field(DESC, "Analog Output") <== Your description
field(LOW, "2") <== Low limit for minor alarm (warning)
field(LOLO, "1") <== Low limit for major alarm
field(LSV, "MINOR") <== LOW severity
field(LLSV, "MAJOR") <== LOLO severity

For real data values
record(ao, "lbc:side0:dewarTemp") <== Your variable here
field(DESC, "LBC Blue temperature") <== Your description
field(EGU, "degrees K") <== Engineering units
field(HIHI, "215") <== High limit for major alarm
field(HIGH, "210") <== High limit for minor alarm
field(LOW, "165") <== Low limit for minor alarm
field(LOLO, "160") <== Low limit for major alarm
field(HHSV, "MAJOR") <== HIHI severity
field(HSV, "MINOR") <== HIGH severity
field(LSV, "MINOR") <== LOW severity
field(LLSV, "MAJOR") <== LOLO severity

C) ALH-SSS.alhConfig
This file defines the alarm group structure or layout for your variables. Please look at the ECS file which is quite complete as a very good working
example. The full documentation regarding the contents of this file can be found at

The LBTO-specific documenation can be found at

under the topic "Alarm Configuration File (specific for LBTO)".

  • Use mixed-case for your variable names when applicable. In particular, you should follow what has been done in ECS. You should use an ALIAS which will be the text that appears for the leaves of your subsystem. An ALIAS can have spaces - make them work for you.
  • You should have an entry which is essentially the same as the first ECS entry. You should call it "SSS Run State" for consistency across all subsystems.
  • Unless your GUIDANCE is only a single line, you should put the GUIDANCE on a Web page. I have created a Web page for GUIDANCE

The ECS only has one entry at the moment, but you get the gist. There is an anchor at the specific location on the page for help. When you are providing guidance, you need to tell folks what to examine as well as what to do about the negative situation.

-- %USERSIG{MicheleDeLaPena - 2014-08-05}%


Topic revision: r3 - 05 Feb 2020, MatthieuBec
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback