Project

General

Profile

SMC - Expert - hot alarm range install

Here are instructions for editing alarm ranges and getting them active without rebooting the IOC. These instructions are only for slowmoncon experts or system experts who are comfortable with the procedure.

The basic steps for a persistent alarm range change are as follows:

I. Update the static "db" files for the IOC. (For most systems this involves editing a spreadsheet and running make; there are a few exceptions.)
II. Update the values in the running IOC. (There are three options for how to do this.)
III. Commit changes to git.

Note: There is also a lazy way of making a "hot" change in alarm ranges that will not survive an IOC reboot, which is not recommended and not explained here.

I. Change values in the static db file(s), so the change will last

1. Log in to uboonesmc@smc.

2. Set up EPICS and git, and pull in the latest files from git.

Note the slowmoncon files should always be up to date, but we share a repository with uboonedaq, and doing "git pull" at this point will avoid needless merges.

 source ~uboonesmc/setup_SMC_EPICS.sh
 setup git
 cd ~uboonesmc/slowmoncon
 git pull

3. Edit csv spreadsheets (most systems)

The following instructions for this step apply to all systems except TPCDrift and Weather. See db file special cases below for those systems.

Open the csv file of channel settings for the system of interest in emacs or ooffice. The files are in the csv subdirectory of make_db, and are named uB-init-{subsystem}-{channeltype}.csv. For example, to update alarm range settings for an analog input (ai) channel in the Cryo system, one would edit csv/uB-init-Cryo-ai.csv using one of the following:

 cd make_db
 ooffice csv/uB-init-Cryo-ai.csv

or

 cd make_db
 emacs csv/uB-init-Cryo-ai.csv
 ctrl-C ctrl-A

[ctrl-C ctrl-A is the sequence to align columns in emacs csv mode.]

Find the rows for the channels of interest, and change the values in the LOLO,LOW,HIGH,HIHI columns.

4. Rebuild and install the IOC db files

The following instructions for this step apply to all systems except TPCDrift and Weather. See db file special cases below for those systems.

 make
 make install

If Wiener supplies were changed (PMTHV, CrateRails, OnDetPower) then also do the following:

 cd ../apps/Wiener
 make

db file special cases

The following procedures replace steps 3 and 4 for various subsystems.

TPCDrift special case

To update the db file, you must edit the appropriate TPCDrift-related file(s) in slowmoncon/apps/slowmoncon_box_ioc/db directly. Then copy them to the corresponding directory on the Glomation in the TPC Drift HV rack (Glomation #8, 192.168.144.208). This isn't as friendly as it should be to subsystem experts yet; it is probably best done by or with a slowmoncon expert.

After doing this, proceed to step 5 below.

Weather special case

Edit the db file in ~uboonesmc/slowmoncon/apps/Weather directly.

After updating the db files, proceed to step 5 below.

5. Make sure you like what you've done to the db files:

 git diff

Loop back to the edit step if you see something you don't like.

II. Load the new values into the appropriate IOC

There are three options here:

Option A. One way to do it is to reboot the IOC, but that is disruptive: it causes temporary loss of status, invalid alarms, etc.

Option B. A better way is to load the new alarms using the pvtable feature of CSS. The make step above created a set of files in /home/uboonesmc/slowmoncon/make_db/pvs/, with names like {subsystem}-{channeltype}-alarmlevels.pvs. Load the appropriate table from that directory, e.g., Cryo-ai-alarmlevels.pvs. Inspect the values -- things that will change when you "restore" the pv table are shaded light blue. If you are happy, hit the "restore values" button. Your new alarm limits are now loaded in the running IOC.

Option C. If you have changed only one or two limits, then a potentially quicker way to push the changes in is by using caput, e.g., if one wanted to change the LOLO (low major alarm limit) setting of AT609 in the Cryo system, one could caput uB_Cryo_IFIX_1_0/AT609.LOLO 6.02e23. It is easier to make a typo that way than with pvtable restore approach. This only pushes the change into the running system; it does not make the change persistent.

After doing the above, please check the status of everything in CSS and make sure everything is working the way you want.

III. Save changed csv and db files to git.

 cd ~uboonesmc/slowmoncon
 git pull
 git status -s
 git add -u .
 git commit -m 'New alarm ranges and units for AT609, AT610, PT165 in cryo system, per Mike Z.' \
                    --author='Glenn Horton-Smith <gahs@phys.ksu.edu>'
 git push

Note that another git pull before committing is always a good idea to avoid unnecessary merging due to unrelated changes to other uboonedaq projects. Check the output of git status -s to be sure only the right files have changed. Don't forget to edit the git commit line to have your appropriate author info and relevant commit message.