- Fixes to HM code for AMOR TOF

- A couple of TAS fixes
- o2t was fixed to work with any drivable
- FOCUS was mended to include beam monitor in data file
This commit is contained in:
cvs
2002-07-19 15:09:21 +00:00
parent e0c5afcf6d
commit bde19bb973
38 changed files with 604 additions and 249 deletions

View File

@@ -531,7 +531,7 @@ int PrepInput(char *label) {
sensD.alarm=0;
}
loop=1;
resist=10;
resist=25;
str_copy(heUnits, "%");
i=sscanf(t, "%12s%n", nam, &l);
@@ -1108,6 +1108,9 @@ void CalcMaxPower(void) {
}
}
#define ABS(x) (x < 0 ? -(x) : (x))
int SetMaxPower(void) {
int i, j;
float pa, pr, pw, dif, p;
@@ -1121,13 +1124,17 @@ int SetMaxPower(void) {
CalcMaxPower();
}
logfileOut(LOG_MAIN, "maxPower changed from %g to %g\n", p0, maxPower);
ERR_P(LscCmd(ser, "CDISP 1:[loop],[resist],1;MOUT [loop]:0;CMODE [loop]:1"));
ERR_P(LscCmd(ser, "CDISP 1:[loop],25000,1;MOUT [loop]:0;CMODE [loop]:1"));
if (slope<0) slope=-slope;
if (slope!=0 && slope<0.1) slope=0.1;
fbuf=tLimit/CtlScale();
if (loop==1) {
prop=sqrt(p0/scalPower)*prop;
ERR_P(LscCmd(ser, "CLIMIT 1:[fbuf],[slope],0,[iAmp],[iRange];PID [loop],[prop]"));
if(ABS(p0) > .0 && ABS(scalPower) > .0){
prop=sqrt(p0/scalPower)*prop;
} else {
prop = 10.;
}
ERR_P(LscCmd(ser, "CLIMIT 1:[fbuf],[slope],0,2.0,[iRange];PID [loop],[prop]"));
} else {
ERR_P(LscCmd(ser, "CLIMIT 2:[fbuf],[slope],0"));
}