Re: [foxboro] Listing all Configured Alarms

John,

I wrote a quick iccapi script along this line to pull out alarms limits and
deadbands. Getting the alarm groups and priorities is left as an exercise to
those who are interested in that kind of data.

Duc

-- 
Duc M. Do
Dow Corning Corp.
Carrollton Plant
Carrollton, KY, US


---------------------start script-----------------------
#!/bin/sh
# @(#)run_icc          Version 1.01     9/02/04

# This file is   run_icc
#
#
# Revision History:
#
#  8/05/04  DMD  1.0   original concept and script file
#  9/02/04  DMD  1.01  get the iccdrvr.tsk part to work properly


#------------------+
# Function section |
#------------------+
#
# function 'usage' echoes the syntax
usage() {
echo "\nUsage:  run_icc <CPlbug>\n
        <CPlbug>: letterbug ID of a control station\n"
}

#
# function 'ain_alarm'
ain_alarm() {
echo "
OPEN $CP READ byDuc
GET *:* SUBSET AIN
NAME
DESCRP
HLOP
HAL
LAL
HLDB
END
CLOSE
EXIT" > $INPUTFILE
run_icc
concat
}

#
# function 'control_alarm' (for DGAP, PID* and PTC)
control_alarm() {
echo "
OPEN $CP READ byDuc
GET *:* SUBSET DGAP
NAME
DESCRP
MALOPT
MEASHL
MEASLL
MEASDB
HHAOPT
HHALIM
LLALIM
DALOPT
HDALIM
LDALIM
DEVADB
END
GET *:* SUBSET PID*
NAME
DESCRP
MALOPT
MEASHL
MEASLL
MEASDB
HHAOPT
HHALIM
LLALIM
DALOPT
HDALIM
LDALIM
DEVADB
END
GET *:* SUBSET PTC
NAME
DESCRP
MALOPT
MEASHL
MEASLL
MEASDB
HHAOPT
HHALIM
LLALIM
DALOPT
HDALIM
LDALIM
DEVADB
END
CLOSE
EXIT" > $INPUTFILE
run_icc
concat
}

#
# function 'ram_alarm'
ram_alarm() {
echo "
OPEN $CP READ byDuc
GET *:* SUBSET REALM
NAME
DESCRP
HLAOPT
HABLIM
LABLIM
ABSDB
HHAOPT
HHALIM
LLALIM
DALOPT
HDALIM
LDALIM
DEVADB
END
CLOSE
EXIT" > $INPUTFILE
run_icc
concat
}

#
# function 'run_icc'
run_icc() {
cd /opt/fox/ciocfg/api
./iccdrvr.tsk -i $INPUTFILE -d $OUTPUTFILE
}

#
# function 'concat'
concat() {
cat $OUTPUTFILE >> /tmp/$CP.alarms.txt
}


#-------------+
# Main script |
#-------------+
if [ $# -lt 1 ]; then usage; exit; fi

# set up the temp directory and needed variables
CP=`echo $1 | tr '[a-z]' '[A-Z]'`
INPUTFILE=/tmp/iccdrvrtsk_input
OUTPUTFILE=/tmp/iccapi_output

# set up the report file
if [ ! -f /tmp/$CP.alarms.txt ]
then touch /tmp/$CP.alarms.txt
else cp /dev/null /tmp/$CP.alarms.txt
fi

# run the iccapi commands
ain_alarm
control_alarm
ram_alarm
echo "Alarm settings for compounds in $CP are in /tmp/$CP.alarms.txt"

# clean up
rm $INPUTFILE $OUTPUTFILE
----------------------end script------------------------


-----Original Message-----
From: foxboro-bounce@xxxxxxxxxxxxx
[mailto:foxboro-bounce@xxxxxxxxxxxxx]On Behalf Of
jwsmith@xxxxxxxxxxxxxxxx
Sent: Thursday, December 16, 2004 12:22 PM
To: foxboro@xxxxxxxxxxxxx
Subject: [foxboro] Listing all Configured Alarms


I did some searching through the archives and didn't find
what I was looking for=2E  I hate to start a whole new thread
if the topic has already been addressed but here goes:

Anybody ever written a script or tool that would take the ascii
file created by the iccprt and cull out all configured alarms,
their groups, and their priorities?  Such a tool would be very
handy indeed when it comes time to work on alarm reductions=2E

Thanks and Happy Holidays to all on the list,

John W=2E Smith

 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             http://www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: