Usage : CHLOAC is the Java Open Access Client (OAC) process which
calculates turbine flows and efficiencies for CHL. You can
view log files for CHLOAC in the directory
'daesrv\\engines\files\oac'.
Restart: CHLOAC is restarted when its DAE is restarted.
#######################################################################
# This OAC has been moved to Java. The VMS-based CHLOAC is obsolete. #
# The keeper of the Java-based CHLOAC is Zongwei Yuan. #
#######################################################################
Usage : CHLOAC is a process that calculates turbine flows and efficiencies
for CHL and stores data as a device with associated dabbel device
index assigned. Data is retrieved by use of conventional data base
procedures, such as: Parameter Pages, Data Logger, G:######", etc..
During program initiation the following files are checked for valid
devices and inserted into the input device list used in calculations.
If no valid device(s) are found, the default devices are used
unmodified.
Files Read In At Program Initation:
CFSS::OP$USR1:[VAXAPPL.OAF.CHLOAC]ISO_ROTO_DEVICES.TXT
CFSS::OP$USR1:[VAXAPPL.OAF.CHLOAC]NBS_FLOW_DEVICES.TXT
The user can change input devices by modifying the appropiate file in
"CNS27::USR$SCRATCH:[GANSTER.CHLOAC]" and sending a
"utilreq CFSS CHLOAC USER #" request to CHLOAC. Details are found
in "CNS27::USR$SCRATCH:[GANSTER.CHLOAC]CHLOAC_README.TXT" and as
headers in the appropiate file ie;
ISO_ROTO_DEVICES.TXT or NBS_FLOW_DEVICES.TXT.
USER MODIFICATION OF INPUT DEVICE FILES INFORMATION CAN BE FOUND
IN "CNS27::USR$SCRATCH:[GANSTER.CHLOAC]CHLOAC_README.TXT"
Disabled: May 1999 G:A0BOIL, cal_A0BOIL() disabled as of (cryo) Joel Fuerst
request. Remove "skip" from cal_A0BOIL() and recompile to enable.
May 1999 CHL Cold Box 1 Flow routines disabled as of (chl) Mike
Geynisman request. Replace with original flow_dev_names[]
which are commented out in "CHL_FLOW_DEV.H" to prevent PLC timeout
errors and recompile to enable Cold Box 1 calculations.
The first seven rows of
"static char flow_dev_names[(NUM_FLOW_CAL*NUM_FLOW_TEXT_CHAR)+1]"
have been replaced with Cold Box 2 devices and CALCULATION_ERROR
is being stuffed into the first seven values in
static void calculate_nbs_flow_c().
if ( dev < 7 )
{
cal_flows[dev] = (float)(CALCULATION_ERROR);
}
Errors : User information errors are written to "CHLOACLG.DAT" and can be
viewed by using "D112 LOGTEST"
INTERRUPT ON: *read from a log
AT PROMPT : File [testalog]
ENTER : File [chloaclg]
May 1999 Bob Joshel requested that no calculation errors be returned
and an known bad value (-1) CALCULATION_ERROR be diplayed in place
of error codes. OAC_RANGE, OAC_CORRUPT, OAC_NOSETUP, OAC_INPERR,
OAC_INVDEV etc. were replaced with CALCULATION_ERROR in the
"open acces value" retuned.
The CHL Helium Farm Inventory routines still returns the OAC_XXXXX
error codes. CHL Helium Farm Inventory have valid negative values.
[more error infomation below]
Node : CHLOAC runs on node CFSS.
Restart: CHLOAC is restarted on an Acnet boot. Using the Operator
account on CFSS, a restart may be done with 'ACNET RESTART CHLOAC'.
Flow Devices DI:
116503,116504,116505,116506,116507,
116508,116509,116510,116511,116512,
116513,116514,116515,116516,116517,
116496,116518,116519,116520,116521,
116522,116523,116524,116525,116526,
116527,116528,116529,116530,
Efficiency Devices DI:
116546, 116548, 116550, 116547, 116549, 116551
chl_periodic(): Checks for "utilreq" every 2 seconds and services them during
"update_pool" call. "update_pool" is called app. every 30
seconds. Any additional "utilreq" received during the wait
for "update_pool" will be ignored and return a CBS_BUSY error
code.
update_pool() : Main routine for periodic updates. Called every 30 seconds.
Builds lists for FTD_ONESHOT retrieval.
dio_device_index_c, dio_bld_get_c, dio_get_lst
"int init_db" set to TRUE if build list fails. Next time
through loop another build will be made. If build fails 20
times in row, the program will exit and will automaticly be
restarted.
dio routines are called in a
"for (ii = 0; ii < NUM_DIO_LISTS; ++ii)" loop. Curently there
are two seperate lists of devices, NUM_DIO_LISTS. One list for
flow calculations and the other for efficiency calculations.
The dio_routines use pointer arraies for device_indices,
device_names , number_of_devices etc.. These arraies are
declared in CHL_FLOW_DEV.H. To add\modify\update update_pool()
the following arries need to be modified:
NUM_DIO_LISTS
static char *dio_error_mesg[] = { "NBS_FLOW dio device index failed",
"EFF_CAL dio device index failed",
"NBS_FLOW dio bld get c failed",
"EFF_CAL dio bld get c failed" };
static const char *dio_names[] = { working_flow_names, working_eff_names };
/* pointer to array of device names */
static const int dio_num_inputs[] = { NUM_FLOW_INPUT_DEV, NUM_EFF_INPUT_DEV };
/* number of devices in dio_names "device names" */
static const int log_num_dev[] = { NUM_FLOW_DEV, NUM_EFF_DEV };
/* offset into columns to log dio_device errors */
static const int log_num_cal[] = { NUM_FLOW_CAL, NUM_EFF_CAL };
/* offset into rows to log dio_device errors */
static const long *dio_di[] = { flow_dev_di, eff_dev_di };
/* pointer to array of device indicies */
static const float *dio_values[] = { flow_dev_val, eff_dev_val };
/* pointer to array of device values */
static const short *err_oac[] = { &oac_errors[NBS_LIST],
&oac_errors[EFF_LIST] };
/* pointer to array of oac errors */
static const float flow_range[] = { FLOW_FLOW_RANGE, FLOW_TEMP_RANGE,
FLOW_PSIA_RANGE };
/* calculate_nbs_flow range check values */
static const float eff_range[] = { EFF_TEMP_RANGE, EFF_PSIA_RANGE,
EFF_TEMP_RANGE, EFF_PSIA_RANGE,
EFF_SPEED_RANGE, EFF_FLOW_RANGE };
/* calculate_eff range check values */
"calculate_nbs_flow_c" and "calculate_eff" are called from
"update_pool" and perform the flow and efficiency calculations.
Any individual device dio errors are passed to
"calculate_nbs_flow_c" and "calculate_eff" and result in that
specific device not being calculated.
get_input_devices(): "get_input_devices" is called to read in files containing
device names for input values for flow and efficiency.
During program initation ISO_ROTO_DEVICES.TXT and
NBS_FLOW_DEVICES.TXT are opened and checked for input device
modification\change. Any device modified\changed are inserted
into the "working_XXX_names" arries and used in dio_routines.
"utilreq" can be used to send user modified files
ISO_ROTO_DEVICES.TXT and NBS_FLOW_DEVICES.TXT to "CHLOAC.EXE"
This allows the user to change devices used for input values
for both flow and efficiency. Details on how to modify
devices can be found by reading "CHLOAC_README.TXT"
located in "CNS27::USR$SCRATCH:[GANSTER.CHLOAC]" If a user
successfully modifies and sends a input device value file,
ISO_ROTO_DEVICES.TXT or NBS_FLOW_DEVICES.TXT by using
"utilreq", "CHLOAC.EXE" will copy the modified file(s)
from "CNS27::USR$SCRATCH:[GANSTER.CHLOAC] to
"CFSS::OP$USR1:[VAXAPPL.OAF.CHLOAC]" and they will become
the new default files to read in at program initation.
update_cryo_mio():
Two different process are running in CHLOAC, update_pool()
and the second is update_cryo_mio() which currently ,May 1999,
calculates nine devices. Three for Cryo G:A0BOIL, G:A0TIH3,
G:A0WALT. G:A0BOIL is bypassed, as Joel Fuerst (Cryo) request.
G:A0BOIL requires recompling to fix, cal_A0BOIL();.
CHL Tank Farm Inventory has six devices. G:CHVTF, G:CHV10K,
G:CHV11K, G:CHVHEL, G:CHLHEH, G:CHLHED.
CHL 10K Dewar Devices:
static const char dewar10kNames[] = {"T:1DL5K T:2DP302"};
/* 10Kdewar DiffPress T:1DL5K INCHES OF WATER
10Kdewar atmosphere T:2DP302 PSIA */
CHL 11K Dewar Devices:
static const char dewar11kNames[] = {"T:2DL11KT:2DP454"};
/* 11Kdewar DiffPress T:2DL11K INCHES OF WATER
11Kdewar atmosphere T:2D454 PSIA */
Errors returned:
CHLHeliumVolume().
OAC_NOSETUP , dfpt_c() fails to
calculate density at standard temperature and pressure.
calTankHeVolume()
OAC_INVDEV or DIO_MEMFAIL, dio_device_index_c() fails.
OAC_INPERR or DIO_MEMFAIL, dio_bld_get_c() fails
OAC_INPER or dio_XXXXX, dio_get_lst() fails
OAC_RANGE, if (dewarPSIA > (CRITICAL_POINT * PSIA))
CHL Tank Farm Helium Gas Devices;
static const char pressDevNames[] = "
T:TFP01 T:TFP02 T:TFP03 T:TFP04 T:TFP05
T:TFP06 T:TFP07 T:TFP08 T:TFP09 T:TFP10 \
T:TFP11 T:TFP12 T:TFP13 T:TFP14 T:TFP15 ";
/* CHL Tank Farm Helium Gas pressure in PSIG */
static const char tempDevNames[] = "
T:TFT01 T:TFT02 T:TFT03 T:TFT04 T:TFT05 \
T:TFT06 T:TFT07 T:TFT08 T:TFT09 T:TFT10 \
T:TFT11 T:TFT12 T:TFT13 T:TFT14 T:TFT15 ";
/* CHL Tank Farm Helium Gas temperatue Kelvin */
CHLTankGasVolume()
OAC_NOSETUP, dio_device_index_c(),dio_bld_get_c()
dio_get_lst() fails for pressure or temperature
devices.
EFFICIENCY_COLD_COMP.C eff_cold_comp()
Add routine to calculate cold compressor efficiency
to CHLOAC. Calculated devices T:A1CCEF...T:F4CCEF.
(O) indicates Cold Compressors are off and no
calculation is attempted. (-1) returned indicates
an input device error, or helium property calculation
error. Input devices errors include DIO_READ errors,
and DEVICE OUT OF RANGE errors. Specific input device
errors and Helium property error codes are writen to
CHLOACLG log file accessed by D112 LOGTEST.
Input devices are T:F4PI11,T:F4PICX,T:F4TICI,T:F4TRCX.
Also T:F4PATM or T:BRPATM or L:CBAR is used in
efficiency calculation. If no atmosphere pressure
devices is available defaults to 14.3 patm input pressure.
utilreq: "utilreq" can be used to send commands to "CHLOAC.EXE"
to turn on\off debugging, update ISO_ROTO_DEVICES.TXT and
NBS_FLOW_DEVICES.TXT input device files and restore the default
input devices. Debugging output written to "OAC_CHLOAC.LOG"
in "CFSS::OP$USR1:[VAXAPPL.OAF.CHLOAC]" and can be viewed after
"utilreq cfss chloac dump" command is sent.
COMMAND:
utilreq cfss chloac user #
'#' represents "select" one of the following switch statement
in "service_utilreq".
WARNING: TURNING ON ALL DEBUGGING TOOLS
"utilreq cfss chloac user 12" WILL WRITE ALL DIO_ARRAY ERRORS
TO FILE CREATING A VERY LARGE FILE QUICKLY.
switch((int)select)
{
case 1: /* reinit with default data */
*default_devices = TRUE;
break;
case 2: /* import flow devices */
import->select_file = NBS;
import->select_path = USER_FILE;
import->num_dev = NUM_FLOW_DEV;
import->max_array = NUM_FLOW_CAL;
import->dev_names = working_flow_names;
status = get_input_devices(import);
if (status)
{
init_db = TRUE;
system("$ copy CNS27::USR$SCRATCH:[GANSTER.CHLOAC]\
NBS_FLOW_DEVICES.TXT *");
}
break;
case 3: /* import efficiency devices */
import->select_file = EFF;
import->select_path = USER_FILE;
import->num_dev = NUM_EFF_DEV;
import->max_array = NUM_EFF_PARAM;
import->dev_names = working_eff_names;
status = get_input_devices(import);
if (status)
{
init_db = TRUE;
system("$ copy CNS27::USR$SCRATCH:[GANSTER.CHLOAC]\
ISO_ROTO_DEVICES.TXT *");
}
break;
case 4: /* debug dio routines */
bugs = BUGS_DIO;
break;
case 5: /* debug show number pending */
bugs = BUGS_NUM_PENDING;
break;
case 6: /* debug calulate_nbs_flow input vals */
bugs = BUGS_NBS_FLOW_INPVAL;
break;
case 7: /* debug calculate_nbs_flow calulations */
bugs = BUGS_NBS_FLOW_CALVAL;
break;
case 8: /* debug all calculate_nbs_flow vals */
bugs = (BUGS_NBS_FLOW_INPVAL | BUGS_NBS_FLOW_CALVAL);
break;
case 9: /* debug calulate_eff input vals */
bugs = BUGS_EFF_INPVAL;
break;
case 10: /* debug calculate_eff calulations */
bugs = BUGS_EFF_CALVAL;
break;
case 11: /* debug all calculate_eff vals */
bugs = (BUGS_EFF_INPVAL | BUGS_EFF_CALVAL);
break;
case 12: /* turn all debug statements on */
bugs = 0xFF;
break;
case 13: /* turn all debug statements off */
bugs = 0;
break;
default:
break;
}
Keeper: Zongwei Yuan
OAC Node: dce39
Now: Mon Oct 6 22:58:22 2008