EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Subroutine record input fields don't get archived
From: [email protected] (Marty Kraimer)
To: [email protected]
Date: Tue, 24 Oct 1995 08:58:22 -0500
> 
> The code could be changed so that archive values would be 
> returned for the subroutine input fields by checking the difference
> between *pnew and *pprev against psub->adel in the loop that posts monitors
> for changes in the input fields and setting the bit for DBE_LOG in the monitor
> mask in case the change is larger than psub->adel.  The problem with
> this approach is that there is only one adel and it will probably not
> fit all the input fields.
>  
>  /* check for archive change */
>         delta = psub->alst - psub->val;
>         if(delta<0.0) delta = -delta;
>         if (delta > psub->adel) {
>                 /* post events on value field for archive change */
>                 monitor_mask |= DBE_LOG;
>                 /* update last archive value monitored */
>                 psub->alst = psub->val;
>         }
>         /* send out monitors connected to the value field */
>         if (monitor_mask){
>                 db_post_events(psub,&psub->val,monitor_mask);
>         }
> 	/* check all input fields for changes*/
> 	for(i=0, pnew=&psub->a, pprev=&psub->la; i<ARG_MAX; i++, pnew++, pprev++) {
> 		if(*pnew != *pprev) {
> 			db_post_events(psub,pnew,monitor_mask|DBE_VALUE);
> 			*pprev = *pnew;
> 		}
> 
> 
>         return;
> }
 
Note that if the code checking for archive changes sets the DBE_LOG
bit in monitor_mask then any input that changed in this iteration of
record processing will also set of archiver monitors.

DBE_LOG monitors will be missed, however, if an input has changed since
the previous DBE_LOG monitor for VAL BUT does not change in the
iteration when new DBE_LOG monmitor for VAL is detected.

We could change the last db_post to

	db_post_events(psub,pnew,monitor_mask|DBE_VALUE|DBE_LOG);

Note that mdel is not being used for input fields. It seems rather ugly to
end up having mdel and adel fields for every input. Using mdel and adel
for input fields will not, as Roselle point out, work.

Marty Kraimer


Navigate by Date:
Prev: Re: Subroutine record input fields don't get archived Rozelle Wright
Next: Re: Subroutine record input fields don't get archived I.Smith
Index: 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Subroutine record input fields don't get archived I.Smith
Next: Re: Subroutine record input fields don't get archived Rozelle Wright
Index: 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·