EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  <19961997  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  1995  <19961997  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: error in mbbiDirect-record-processing
From: Thomas Birke <[email protected]>
To: [email protected]
Date: Wed, 10 Apr 1996 13:43:43 +0200
While playing around with the `mbbiDirect'-record, we encountered the
problem, that the corresponding bits (B0..BF) are not set properly after
the record is processed.

The point is, that in 'base/src/rec/recMbbiDirect.c' (still 3.12.2!)
'refresh_bits()' is called "too early" (before VAL is set to the new value).

After aplying the following patch, all seems to work fine.

---- 8< -------------------------------- snip -----
*** base/src/rec/recMbbiDirect.c.ORIG	Mon Nov 20 10:50:13 1995
--- base/src/rec/recMbbiDirect.c	Wed Apr 10 12:36:35 1996
***************
*** 224,227 ****
--- 224,230 ----
  	else if(status == 2) status = 0;
  
+ 	/* VAL is now set properly, set the bitfield */
+       refresh_bits(pmbbiDirect);		/* 10 Apr 96 12:30 by birke */
+ 
  	/* check event list */
  	monitor(pmbbiDirect);
***************
*** 287,291 ****
  	if (pmbbiDirect->pact == TRUE){
  		status=(*pdset->read_mbbi)(pmbbiDirect);
!               refresh_bits(pmbbiDirect);
  		return(status);
  	}
--- 290,294 ----
  	if (pmbbiDirect->pact == TRUE){
  		status=(*pdset->read_mbbi)(pmbbiDirect);
!               /* refresh_bits(pmbbiDirect);  not a good idea, VAL is not yet set */
  		return(status);
  	}
***************
*** 298,302 ****
  	if (pmbbiDirect->simm == NO){
  		status=(*pdset->read_mbbi)(pmbbiDirect);
!               refresh_bits(pmbbiDirect);
  		return(status);
  	}
--- 301,305 ----
  	if (pmbbiDirect->simm == NO){
  		status=(*pdset->read_mbbi)(pmbbiDirect);
!               /* refresh_bits(pmbbiDirect);  not a good idea, VAL is not yet set */
  		return(status);
  	}
***************
*** 308,312 ****
  			pmbbiDirect->val=pmbbiDirect->sval;
  			pmbbiDirect->udf=FALSE;
! 			refresh_bits(pmbbiDirect);
  		}
                  status=2; /* dont convert */
--- 311,316 ----
  			pmbbiDirect->val=pmbbiDirect->sval;
  			pmbbiDirect->udf=FALSE;
! 			/* will be done in 'process' */
! 			/* refresh_bits(pmbbiDirect); */
  		}
                  status=2; /* dont convert */
----- 8< -------------------------------- snap -----

Comments welcome ...

So long,
Thomas

_______________________________________________________________________________

 Thomas Birke  BESSY II  (+49)-30-6392-4934 (fax -4859)  [email protected]
                                                    http://www.bessy.de/~birke


Navigate by Date:
Prev: HTML tools Mark Rivers
Next: Proposed stepper motor code modifications Ric Claus
Index: 1994  1995  <19961997  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: HTML tools Mark Rivers
Next: Proposed stepper motor code modifications Ric Claus
Index: 1994  1995  <19961997  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 ·