EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: monitors on array variables
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: "Siddons, David" <siddons at bnl.gov>
Cc: EPICS Tech-Talk <tech-talk at aps.anl.gov>
Date: Mon, 23 Mar 2020 22:08:43 -0700
On 3/23/20 10:32 AM, Siddons, David wrote:
> Hi Mark, Michael,
>    Adding Michaels post-all command at the end of process() and special() made things update properly.

Excellent, so it is only a question of sorting out the arguments passed to db_post_events().

> Also, replacing that command at the end of special() with scanOnce() had the same effect. I'm afraid I don't understand things deeply enough to know why the individual posts didn't work. I would offer to send the code, but it is long and complicated and I don't want to bother you with it. At least I can move forward with other implementation details still to be done. If you have any further suggestions for things to try I'd be grateful.



From the number of alternatives commented out, I take it that this is where your having problems.

>  //	db_post_events(pscal,&(pscal->runno),DBE_VALUE); 
>  //	db_post_events(pscal,&(pscal->mca),DBE_VALUE); 
>  //	db_post_events(pscal,&(pscal->tdc),DBE_VALUE); 
>  //	db_post_events(pscal,&(pscal->spct),DBE_VALUE); 
>  	db_post_events(pscal,NULL,0xf); 

https://github.com/dpsiddons/Hera-384/blob/889be28db1ae736f3a14b44988544e55fd765fb0/Mars_DDM/zDDMApp/src/zDDMRecord.c#L769-L773

Since you used it in your mails, I'll take SPCT as an example.  I think what you have here would be correct, including the `&`,
except for the code in cvt_dbaddr()

>  case zDDMRecordSPCT:{ 
>     paddr->pfield = (void *)(pzDDM->pspct); 

https://github.com/dpsiddons/Hera-384/blob/889be28db1ae736f3a14b44988544e55fd765fb0/Mars_DDM/zDDMApp/src/zDDMRecord.c#L255-L256

Because `DBADDR::pfield` is being overwritten, it is necessary to post using the address being stored in pfield.

> db_post_events(pscal, pscal->pspct, DBE_VALUE); 

Note the absence of `&` as the address being assigned to `pfield` is the address of the allocation,
not the address of the zDDMRecord::pspct field.


Also, as a note.  To be archiver friendly, the usual mask is 'DBE_VALUE|DBE_ARCHIVE'.

Replies:
Re: monitors on array variables D. Peter Siddons via Tech-talk
Re: monitors on array variables Siddons, David via Tech-talk
References:
monitors on array variables Siddons, David via Tech-talk
Re: monitors on array variables Michael Davidsaver via Tech-talk
Re: monitors on array variables Michael Davidsaver via Tech-talk
Re: monitors on array variables Siddons, David via Tech-talk
Re: monitors on array variables Mark Rivers via Tech-talk
Re: monitors on array variables Siddons, David via Tech-talk
Re: monitors on array variables Mark Rivers via Tech-talk
Re: monitors on array variables Michael Davidsaver via Tech-talk
Re: monitors on array variables D. Peter Siddons via Tech-talk
Re: monitors on array variables Michael Davidsaver via Tech-talk
Re: monitors on array variables D. Peter Siddons via Tech-talk
Re: monitors on array variables Mark Rivers via Tech-talk
Re: monitors on array variables Siddons, David via Tech-talk

Navigate by Date:
Prev: Re: monitors on array variables D. Peter Siddons via Tech-talk
Next: Re: detecting remote PV disconnect (asyn) Hinko Kocevar via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: RE: monitors on array variables Mark Rivers via Tech-talk
Next: Re: monitors on array variables D. Peter Siddons via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 24 Mar 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·