B. COMPOUND/BLOCK/FBM PARAMETERS DATABASES
I am very good sorting and extracting information from spreadsheets, so I wanted to have all compound/block parameters of the system on that format. The parameters of all AIN blocks can be compared easily if you have them in one row per block. You can also produce reports, or rephase blocks to eliminate overruns, etc.
The FBMs database can be used to find out how many pointe you have available as spares in your system, to check if there is no output point being driven from two different AIN blocks, to prepare inventories, etc, etc.
Even when it is not a straightforward procedure, the compound/block parameters can be extracted from the ICC configuration files, or from the Checkpoint files.
Be aware that parameters obtained from Checkpoint files come in alphabetical order, while the ones from ICC files come in the same order as when you use the ICC.
The parameters database is obtained in two steps:
The first step will gather data from ICC (or Checkpoint files) and creates a single ascii file: PLANT.ICC (or PLANT.DBV). This file does not have unnecesary characters or blank lines and is similar to the printouts from the Control Configurator.
The second step converts the parameters listing from columns to rows. You will have for each block just a single line with all the parameters separated by the character "!". The name of this file is PLANT.TXT no matter if your original files came from ICC or checkpoint databases.
I have separate scripts for ICC or Checkpoint files. I recommend the ICC script because you will get data from all CP/GWs in your system. The Checkpoint script retrieves data from local CPs only, and it does not like Gateways (so far). Use the Checkpoint script only if you do not have the Control Configurator API utilities (/opt/fox/ciocfg/api), like on I/A versions previous to 4.x.
B1. FROM ICC WORKFILES:
I created two scripts for this approach: "geticc", and "icc2rows". Run them in that order.
"geticc" will retrieve ALL parameters from ALL CP/GWs in the system. This data will be used to create the output file: PLANT.ICC, with parameters in one single long column.
"icc2rows" will use PLANT.ICC to create the ascii file: PLANT.TXT, a multi-column, one line per block file. The parameter values will be separated by the character: "!".
Transfer file PLANT.TXT to a PC and open it in Excel by specifying "!" as character delimiter.
PLANT.ICC sample:NAME = TCCP01:TC1C1101:11FT046 TYPE = AIN DESCRP = M.P. STEAM TO C-1101 PERIOD = 2 PHASE = 1 IOMOPT = 1 IOM_ID = TC1427 PNT_NO = 2 SCI = 5 HSCO1 = 21.2 ...PLANT.TXT sample:
TCCP01!TCCP01_STA!!COMPND!!1!0!0!2!0!!!!!!!!!!!!!!!!!!!!!!!!! TCCP01!TCCP01_STA!STATION!STA!!!!!!!!!!!!!!!!!!0!0!0!0!0!0! TCCP01!TCCP01_ECB!!COMPND!!1!0!0!2!0!!!!!!!!!!!!!!!!!!!!!!!!! TCCP01!TCCP01_ECB!PRIMARY_ECB!ECBP! !0!0!2!3!R!250!0!2! TCCP01!TCCP01_ECB!TC1738!ECB5!!1!0!TC1738!7!5!0!0!1000!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0! TCCP01!TCCP01_ECB!TC1739!ECB5!!1!0!TC1739!7!5!0!0!1000!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0!0! TCCP01!TC1C1101!!COMPND!!1!0!0!1!0!LP31!TCAWP1!TCAWP2!TCWP01!TCWP02!histtc!!!!!!!!!!!!!!!!!!! TCCP01!TC1C1101!11FT046!AIN!M.P. STEAM TO C-1101!2!1!1!TC1427!2!5!21.2!0.0!1.0!T/D!2.0!0!0!1!1!0!0!0!0!1!1.0!0!0.0!0!0.0!1.0! TCCP01!TC1C1101!11HC019!PID!M.P. STEAM TO C-1101!2!1!:11FT046.PNT!21.2!0.0!1.0!T/D!1!0.0!:11FY046.BCALCO!5!1000.0!100.0!0.0!! TCCP01!TC1C1101!11FY046!AOUT!M.P. STEAM TO C-1101!2!1!1!TC1427!6!3!0!1!:11HC019.OUT!100.0!0.0!1.0!%!2!100.0!0.0!1.0!%!102!-2! TCCP01!TC1C1101!11FC042!PID!GASOIL SIDE REFLUXC-1101!2!0!:11FT042.PNT!5941.46!0.0!1.0!T/D!1!0.0!:11FY042.BCALCO!5!1000.0!100.0!0.0!! TCCP01!TC1C1101!11FY042!AOUT!GASOIL SIDE REFLUXC-1101!2!0!1!TC1426!5!3!1!1!:11FC042.OUT!100.0!0.0!1.0!%!2!100.0!0.0!1.0!%!102!-2!2.! TCCP01!TC1C1101!11FT047!AIN!GASOIL V1104 TO C1101!2!0!1!TC1426!2!5!1103.95!0.0!1.0!T/D!2.0!0!0!1!1!0!0!0!0!1!1.0!0!0.0!0!0.0!1! TCCP01!TC1C1101!11FC047!PID!GASOIL V1104 TO C1101!2!0!:11FT047.PNT!1103.95!0.0!1.0!T/D!1!0.0!:11FY047.BCALCO!5!1000.0!100.0!0.)
B2. FROM CHECKPOINT FILES:
You need just one script here: "dbv2rows". It will extract data from ascii files (*.dbv) found in /opt/ac, that you should have produced previously using /opt/fox/bin/tools/dbvu. The files might have been obtained from local Checkpoint files, or from another host station. The script explain how to run run dbvu to get the files.
The script will produce two ascii files: PLANT.DBV and PLANT.TXT. Again, PLANT.DBV will have parameters in one single long column, while PLANT.TXT will have the parameters in a multi-column, one line per block format, and separated by the character: "!".
Transfer file PLANT.TXT to a PC and open it in Excel by specifying "!" as character delimiter.
B3. PARAMETER NAMES:
Having hundreds of lines with a lot of parameter values, without the name of the parameters can be quite confusing. To solve this problem you can sort the lines according to the block type, then insert additional rows with the names of the parameters for each type of block. I started doing that until I realized that different I/A versions have different number of parameters. In addition, the checkpoint files provide parameters in a different order than the ones obtained from ICC files. Well, I had to create another script to automate this...
"get_head" will create the ascii file HEADERS.TXT, based on information obtained from files PLANT.ICC or PLANT.DBV. The file HEADERS.TXT will have all parameters NAMES in a multi-column, one line per block type, and separated as usual by the character: "!".
HEADERS.TXT sample:CP!COMPOUND!BLOCK!AIN!DESCRP!PERIOD!PHASE!IOMOPT!IOM_ID!PNT_NO!SCI!HSCO1!LSCO1!DELTO1!EO1!OSV!EXTBLK!MA!INITMA!BADOPT!LASTGV!INHOPT! CP!COMPOUND!BLOCK!AOUT!DESCRP!PERIOD!PHASE!IOMOPT!IOM_ID!PNT_NO!SCO!ATC!PROPT!MEAS!HSCI1!LSCI1!DELTI1!EI1!MEROPT!HSCO1!LSCO1!DELTO1! CP!COMPOUND!BLOCK!CALC!DESCRP!PERIOD!PHASE!RI01!HSCI1!LSCI1!DELTI1!EI1!RI02!HSCI2!LSCI2!DELTI2!EI2!RI03!HSCI3!LSCI3!DELTI3!EI3!RI04! CP!COMPOUND!BLOCK!CIN!DESCRP!PERIOD!PHASE!IOMOPT!IOM_ID!PNT_NO!ANM!NM0!NM1!IVO!MA!INITMA!INHOPT!INHIB!INHALM!INVALM!MANALM!SAO!SAP!! CP!COMPOUND!BLOCK!COMPND!DESCRP!PERIOD!PHASE!ON!INITON!CINHIB!GR1DV1!GR1DV2!GR1DV3!GR1DV4!GR1DV5!GR1DV6!GR1DV7!GR1DV8!GR2DV1!GR2DV2! CP!COMPOUND!BLOCK!COUT!DESCRP!PERIOD!PHASE!IOMOPT!IOM_ID!PNT_NO!IN!PROPT!EROPT!PLSOPT!WIDTH!INVCO!MA!INITMA!MANFS!INHOPT!INHIB!BAO!! CP!COMPOUND!BLOCK!ECB1!DESCRP!PERIOD!PHASE!DEV_ID!HWTYPE!SWTYPE!EXTYPE!FSENAB!FSDLAY!BUSWDS!RES01!ROC1!ROC2!ROC3!ROC4!ROC5!ROC6!ROC! CP!COMPOUND!BLOCK!ECB2!DESCRP!PERIOD!PHASE!DEV_ID!HWTYPE!SWTYPE!EXTYPE!FSENAB!FSDLAY!BUSWDS!RES02!FSMM02!FS5D02!FS6D02!FS7D02!FS8D0! CP!COMPOUND!BLOCK!ECB5!DESCRP!PERIOD!PHASE!DEV_ID!HWTYPE!SWTYPE!EXTYPE!FSENAB!FSDLAY!BUSWDS!FPM05!FSMM05!FSDM05!SMM05!P09M05!P10M05! CP!COMPOUND!BLOCK!ECBP!DESCRP!HWTYPE!SWTYPE!NRBUS!BUSOPT!BUSTYP!PIOWDT!MPOLL!FIBER! CP!COMPOUND!BLOCK!IND!DESCRP!PERIOD!PHASE!MA!RSTMA!ACTIVE!RSTACT!INHIB!INHOPT!BPCSTM!HSCI1!LSCI1!DELTI1!EI1!HSCO1!LSCO1!DELTO1!EO1!)
The way I use the output files is:
cat HEADERS.TXT PLANT.TXT > COMBINED.TXT
I know it looks complicated, but it is worth the effort. You will get all PID lines grouped together and headed by a line with the PID parameter names, and so on. Each block type group will have a similar format. Enjoy playing with your new database. You might find surprising results...
B4. FBMs DATABASE:
Once you have obtained file PLANT.ICC or PLANT.DBV, you can easily create an FBM database using the script "get_fbm".
"get_fbm" will produce an ascii database file: FBMS.TXT, that can also be opened by Excel. The output file will have the following fields, separated by "!":
CP Compound Block Block_Type IOM_ID PNT_NO PNT2 PNT3 PNT4 FBMtype
Where:
IOM_ID, is the FBM letterbug
PNT_NO, is the FBM point number for most blocks.
PNT2, PNT3, and PNT4 are additional FBM points used by other blocks like:
TCCP01!TC1C1103!11FT067!AIN!TC1429!2!!!!FBM04 TCCP01!TC1C1103!11FY067_A!AOUT!TC1429!5!!!!FBM04 TCCP01!TC1C1103!11FY067_B!AOUT!TC1429!6!!!!FBM04 TCCP01!TC1C1103!11PT020!AIN!TC1101!3!!!!FBM01 TCCP01!TC1C1103!11QT012!AIN!TC1429!1!!!!FBM04 TCCP01!TC1C1103!11FT055!AIN!TC1101!5!!!!FBM01 TCCP01!TC1C1103!30FT014!AIN!TC1429!4!!!!FBM04 TCCP01!TC1TIA!11TE099!AIN!TC1221!3!!!!FBM02 TCCP01!TC1ESD!11FALL005!CIN!TC1738!1!!!!FBM07B TCCP01!TC1XA!11XA613!CIN!TC1642!7!!!!FBM26B TCCP01!TC1OVR_O!11H005!COUT!TC1642!9!!!!FBM26B TCCP01!TC1OVR_O!11H006!COUT!TC1642!10!!!!FBM26B
FBM points used by PLB blocks are not shown in the database. Add them manually. The script will report the existance of this type of blocks.
Redundant AIN/AOUT blocks use 2 FBMs, my script will report only one. Again, you will be notified if these type of blocks exist in your system.
A previous version of this script named "getfbm" did not get more than one point from each block and did not report the FBM type either
B5. FBMs STATISTICS:
If you just want to know how many FBM01, FBM04, etc, you have currently installed in your system, the following script "get_nfbm" might help you.
"get_nfbm" will simply extract information from /usr/fox/sp/files/IIF.pkg, it will count each type of FBM installed, and report the statistics on file FBM.sum. The statistics can be used to check if you have spares for all those FBM types, the right amount, etc.
Again, if you have added FBMs with the on-line method and you forgot to update your System Configuration, those FBMs will not be counted.
Final note:
If you are like most of us, you do NOT install the new Comittal diskette on ALL the stations on the system every time you modify the system configuration.
If you add new FBMs, most probably you will install the new Comittal diskette only on the station hosting the CP for these FBMs. If this is true, only that station will have its IIF files updated. If you run my script on different station, it will NOT show all the FBMs, and this is NOT my fault.
FBMtype = Quantity ( percent ) FBM01 = 42 ( 19 %) FBM02 = 71 ( 33 %) FBM04 = 61 ( 28 %) FBM07A = 5 ( 2 %) FBM07B = 13 ( 6 %) FBM09D = 1 ( 0 %) FBM26B = 21 ( 9 %) Total = 214
This page hosted by
Get your own Free Home Page