From 030dc689a52f2e4b6762654efae7a7fcd4c06ec0 Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Thu, 18 Apr 1991 14:08:39 +0000 Subject: [PATCH] jba 4/18/91 --- src/rec/recAo.c | 2 +- src/rec/recMbbi.c | 2 +- src/rec/recMbbo.c | 5 ++--- src/rec/recPid.c | 6 +++--- src/rec/recSteppermotor.c | 1 + 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/rec/recAo.c b/src/rec/recAo.c index 4ac355f41..b98e36f63 100644 --- a/src/rec/recAo.c +++ b/src/rec/recAo.c @@ -375,7 +375,7 @@ static int convert(pao) if (pao->oif == OUTPUT_INCREMENTAL) value += pao->val; } else value = pao->val; - if(value>0.0 && value0.0 && valuensevnsta = SOFT_ALARM; pao->nsev = VALID_ALARM; diff --git a/src/rec/recMbbi.c b/src/rec/recMbbi.c index 7c9fa9bec..0336ef138 100644 --- a/src/rec/recMbbi.c +++ b/src/rec/recMbbi.c @@ -272,7 +272,7 @@ static long get_enum_strs(paddr,pes) pes->no_str = 16; bzero(pes->strs,sizeof(pes->strs)); - for(i=0,psource=(pmbbi->zrst); i<15; i++, psource += sizeof(pmbbi->zrst) ) + for(i=0,psource=(pmbbi->zrst); ino_str; i++, psource += sizeof(pmbbi->zrst) ) strncpy(pes->strs[i],psource,sizeof(pmbbi->zrst)); return(0); } diff --git a/src/rec/recMbbo.c b/src/rec/recMbbo.c index a022cfcca..b7857fbc9 100644 --- a/src/rec/recMbbo.c +++ b/src/rec/recMbbo.c @@ -144,8 +144,6 @@ static long init_record(pmbbo) long status; int i; - init_common(pmbbo); - if(!(pdset = (struct mbbodset *)(pmbbo->dset))) { recGblRecordError(S_dev_noDSET,pmbbo,"mbbo: init_record"); return(S_dev_noDSET); @@ -193,6 +191,7 @@ static long init_record(pmbbo) } } } + init_common(pmbbo); return(0); } @@ -327,7 +326,7 @@ static long get_enum_strs(paddr,pes) pes->no_str = 16; bzero(pes->strs,sizeof(pes->strs)); - for(i=0,psource=(pmbbo->zrst); i<15; i++, psource += sizeof(pmbbo->zrst) ) + for(i=0,psource=(pmbbo->zrst); ino_str; i++, psource += sizeof(pmbbo->zrst) ) strncpy(pes->strs[i],psource,sizeof(pmbbo->zrst)); return(0); } diff --git a/src/rec/recPid.c b/src/rec/recPid.c index dd9951161..f9c0ed0ed 100644 --- a/src/rec/recPid.c +++ b/src/rec/recPid.c @@ -356,7 +356,7 @@ struct pidRecord *ppid; float ep; /*previous error */ float de; /*change in error */ float dep; /*prev change in error */ - float dm; /*output value */ + float dm; /*change in manip variable */ float p; /*proportional contribution*/ float i; /*integral contribution*/ float d; /*derivative contribution*/ @@ -412,8 +412,8 @@ struct pidRecord *ppid; /* get the rest of values needed */ dtp = ppid->dt; kp = ppid->kp; - ki = ppid->ki; - kd = ppid->kd; + ki = ppid->ki/60.0; + kd = ppid->kd/60.0; ep = ppid->err; dep = ppid->derr; e = val - cval; diff --git a/src/rec/recSteppermotor.c b/src/rec/recSteppermotor.c index a0e6bba2d..0968b82b8 100644 --- a/src/rec/recSteppermotor.c +++ b/src/rec/recSteppermotor.c @@ -341,6 +341,7 @@ struct steppermotorRecord *psm; return; } psm->pact = TRUE; + tsLocalTime(&psm->time); if (psm->cmod == VELOCITY){ /* check velocity */ if (psm->rrbv != psm_data->velocity){