EPICS Home

Experimental Physics and Industrial Control System


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

Subject: Re: Rec Proc Monitor for mbbi ZRST
From: Andrew Johnson <[email protected]>
To: [email protected]
Cc: "Peters, Charles C." <[email protected]>
Date: Fri, 13 Jan 2012 18:03:49 -0600
Hi Charles,

On 2012-01-13 Peters, Charles C. wrote:
> I want the mbbi st to be monitored for a change.  I can modify the .ZRST at
> runtime, but it is not monitored so I am unable to really change it.
> 
> Is it possible to modify my mbbi to monitor the ST fields?

How are you changing the ZRST field?  If it's from a device support's 
read_mbbi() routine then after changing the field string it should also call
    db_post_events(prec, &prec->zrst, DBE_VALUE | DBE_LOG);
to post value and archive monitors on the ZRST field and 
    db_post_events(prec, &prec->val, DBE_PROPERTY);
to post a property monitor event on the VAL field.  However for many CA 
clients this will not result in them updating their list of choice strings for 
the VAL field because the DBE_PROPERTY monitor event was new in 3.14.11 and 
most CA client programs don't use it yet.

Note that you should never try to do this from an interrupt service routine, 
db_post_events() should only be called from task level with the record locked.

If you're using CA to change the ZRST field then the IOC should already be 
posting value and archive monitors on ZRST when you put the new value, but if 
your CA clients don't have a DBE_PROPERTY monitor on the VAL field they won't 
know anything about the string name for that state changing.

You have just pointed me to a bug though; the record should be posting value 
and archive monitors on the VAL field at the same time as the DBE_PROPERTY 
event if the VAL field's contents currently match the xxST field that was 
changed.  I'll fix that in the next release, and if you add my code above you 
should probably do the same thing, like this instead of my second line:
    int event = DBE_PROPERTY;
    if (prec->val == 0) event |= (DBE_VALUE | DBE_LOG);
    db_post_events(prec, &prec->val, event);

HTH,

- Andrew
-- 
Optimization is the process of taking something that works and
replacing it with something that almost works, but costs less.
-- Roger Needham

Replies:
DBE_PROPERTY support in R3.14.11, gateway, CSS, MBBI/MBBO Re: Rec Proc Monitor for mbbi ZRST Kasemir, Kay
References:
Rec Proc Monitor for mbbi ZRST Peters, Charles C.

Navigate by Date:
Prev: Rec Proc Monitor for mbbi ZRST Peters, Charles C.
Next: problem with 64 bit build of EDM v1-12-68 John Dobbins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Rec Proc Monitor for mbbi ZRST Peters, Charles C.
Next: DBE_PROPERTY support in R3.14.11, gateway, CSS, MBBI/MBBO Re: Rec Proc Monitor for mbbi ZRST Kasemir, Kay
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024