*** empty log message ***
This commit is contained in:
@@ -104,8 +104,13 @@ static long read_wf(pwf)
|
||||
case (DB_LINK) :
|
||||
options=0;
|
||||
nRequest=pwf->nelm;
|
||||
(void)dbGetLink(&(pwf->inp.value.db_link),pwf,pwf->ftvl,
|
||||
pwf->bptr,&options,&nRequest);
|
||||
if(dbGetLink(&(pwf->inp.value.db_link),pwf,pwf->ftvl,
|
||||
pwf->bptr,&options,&nRequest)!=0){
|
||||
if(pwf->nsev < VALID_ALARM) {
|
||||
pwf->nsev = VALID_ALARM;
|
||||
pwf->nsta = LINK_ALARM;
|
||||
}
|
||||
}
|
||||
pwf->nord = nRequest;
|
||||
break;
|
||||
case (CA_LINK) :
|
||||
|
||||
@@ -308,6 +308,13 @@ static void alarm(pbo)
|
||||
{
|
||||
unsigned short val = pbo->val;
|
||||
|
||||
/* check for udf alarm */
|
||||
if(pbo->udf == TRUE ){
|
||||
if (pbo->nsev<VALID_ALARM){
|
||||
pbo->nsta = UDF_ALARM;
|
||||
pbo->nsev = VALID_ALARM;
|
||||
}
|
||||
}
|
||||
|
||||
/* check for state alarm */
|
||||
if (val == 0){
|
||||
|
||||
@@ -161,8 +161,14 @@ static long process(paddr)
|
||||
long no_elements=pdbAddr->no_elements;
|
||||
int alg=pcompress->alg;
|
||||
|
||||
(void)dbGetLink(&pcompress->inp.value.db_link,pcompress,DBR_DOUBLE,pcompress->wptr,
|
||||
&options,&no_elements);
|
||||
if(dbGetLink(&pcompress->inp.value.db_link,pcompress,DBR_DOUBLE,pcompress->wptr,
|
||||
&options,&no_elements)!=0){
|
||||
if(pcompress->nsev < VALID_ALARM) {
|
||||
pcompress->nsev = VALID_ALARM;
|
||||
pcompress->nsta = LINK_ALARM;
|
||||
}
|
||||
}
|
||||
|
||||
if(alg==AVERAGE) {
|
||||
status = array_average(pcompress,pcompress->wptr,no_elements);
|
||||
} else if(alg==CIRBUF) {
|
||||
|
||||
@@ -310,6 +310,13 @@ static void alarm(pmbbi)
|
||||
unsigned short *severities;
|
||||
unsigned short val=pmbbi->val;
|
||||
|
||||
/* check for udf alarm */
|
||||
if(pmbbi->udf == TRUE ){
|
||||
if (pmbbi->nsev<VALID_ALARM){
|
||||
pmbbi->nsta = UDF_ALARM;
|
||||
pmbbi->nsev = VALID_ALARM;
|
||||
}
|
||||
}
|
||||
|
||||
/* check for state alarm */
|
||||
/* unknown state */
|
||||
|
||||
@@ -79,11 +79,11 @@ struct rset pidRSET={
|
||||
cvt_dbaddr,
|
||||
get_array_info,
|
||||
put_array_info,
|
||||
get_units,
|
||||
get_precision,
|
||||
get_enum_str,
|
||||
get_enum_strs,
|
||||
put_enum_str,
|
||||
get_units,
|
||||
get_precision,
|
||||
get_graphic_double,
|
||||
get_control_double,
|
||||
get_alarm_double };
|
||||
@@ -372,10 +372,10 @@ struct pidRecord *ppid;
|
||||
if(dbGetLink(&(ppid->cvl.value.db_link),ppid,DBR_FLOAT,
|
||||
&cval,&options,&nRequest)!=NULL) {
|
||||
if (ppid->nsev<VALID_ALARM) {
|
||||
ppid->nsta = READ_ALARM;
|
||||
ppid->nsta = LINK_ALARM;
|
||||
ppid->nsev = VALID_ALARM;
|
||||
return(0);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
/* fetch the setpoint */
|
||||
if(ppid->stpl.type == DB_LINK && ppid->smsl == CLOSED_LOOP){
|
||||
@@ -384,17 +384,17 @@ struct pidRecord *ppid;
|
||||
if(dbGetLink(&(ppid->stpl.value.db_link),ppid,DBR_FLOAT,
|
||||
&(ppid->val),&options,&nRequest)!=NULL) {
|
||||
if (ppid->nsev<VALID_ALARM) {
|
||||
ppid->stat = READ_ALARM;
|
||||
ppid->sevr = VALID_ALARM;
|
||||
return(0);
|
||||
ppid->nsta = LINK_ALARM;
|
||||
ppid->nsev = VALID_ALARM;
|
||||
}
|
||||
return(0);
|
||||
} else ppid->udf=FALSE;
|
||||
}
|
||||
val = ppid->val;
|
||||
if (ppid->udf == TRUE ) {
|
||||
if (ppid->nsev<VALID_ALARM) {
|
||||
ppid->stat = UDF_ALARM;
|
||||
ppid->sevr = VALID_ALARM;
|
||||
ppid->nsta = UDF_ALARM;
|
||||
ppid->nsev = VALID_ALARM;
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -418,9 +418,8 @@ struct selRecord *psel;
|
||||
if(dbGetLink(&(psel->nvl.value.db_link),psel,DBR_USHORT,
|
||||
&(psel->seln),&options,&nRequest)!=NULL) {
|
||||
if (psel->nsev<VALID_ALARM) {
|
||||
psel->stat = LINK_ALARM;
|
||||
psel->sevr = VALID_ALARM;
|
||||
return(0);
|
||||
psel->nsta = LINK_ALARM;
|
||||
psel->nsev = VALID_ALARM;
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
|
||||
@@ -145,6 +145,12 @@ static long init_record(psm)
|
||||
struct steppermotorRecord *psm;
|
||||
{
|
||||
|
||||
/* get the initial value if dol is a constant*/
|
||||
if (psm->dol.type == CONSTANT ){
|
||||
psm->udf = FALSE;
|
||||
psm->val = psm->dol.value.value;
|
||||
}
|
||||
|
||||
init_sm(psm);
|
||||
return(0);
|
||||
}
|
||||
@@ -663,7 +669,7 @@ struct steppermotorRecord *psm;
|
||||
|
||||
if(dbGetLink(&(psm->dol.value.db_link),psm,DBR_FLOAT,&(psm->val),&options,&nRequest)){
|
||||
if (psm->nsev < VALID_ALARM) {
|
||||
psm->nsta = READ_ALARM;
|
||||
psm->nsta = LINK_ALARM;
|
||||
psm->nsev = VALID_ALARM;
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -132,6 +132,11 @@ void write_timer();
|
||||
static long init_record(ptimer)
|
||||
struct timerRecord *ptimer;
|
||||
{
|
||||
/* get the delay initial value if torg is a constant*/
|
||||
if (ptimer->torg.type == CONSTANT ){
|
||||
ptimer->trdl = ptimer->torg.value.value;
|
||||
}
|
||||
|
||||
|
||||
/* read to maintain time pulses over a restart */
|
||||
read_timer(ptimer);
|
||||
@@ -281,8 +286,14 @@ struct timerRecord *ptimer;
|
||||
nRequest=1;
|
||||
status = dbGetLink(&(ptimer->torg.value.db_link),ptimer,DBR_FLOAT,
|
||||
&(ptimer->trdl),&options,&nRequest);
|
||||
if(status!=0) return;
|
||||
}
|
||||
if(status!=0){
|
||||
if(ptimer->nsev < VALID_ALARM) {
|
||||
ptimer->nsev = VALID_ALARM;
|
||||
ptimer->nsta = LINK_ALARM;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (ptimer->out.type != VME_IO) {
|
||||
if(ptimer->nsev<VALID_ALARM) {
|
||||
ptimer->nsta = WRITE_ALARM;
|
||||
|
||||
Reference in New Issue
Block a user