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: mbbi record ignores mask?
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: 'Eric Norum' <ericnorum at gmail.com>, "Johnson, Andrew N." <anj at anl.gov>
Cc: "tech-talk at aps.anl.gov \(tech-talk at aps.anl.gov\)" <tech-talk at aps.anl.gov>
Date: Tue, 15 Sep 2020 15:59:21 +0000

Sorry, I see you were talking about mbbi, not mbbo.  In that case the documentation (https://wiki-ext.aps.anl.gov/epics/index.php/RRM_3-14_Multi-Bit_Binary_Input) says:

 

MASK is used by the raw soft channel read routine, and by typical device support read routines, to select only the desired bits when reading the hardware register. It is initialized to ((1 << NOBT) - 1) by record initialization. The user can configure the NOBT field, but the device support routines may set it, in which case the value given to it by the user is simply overridden. The device support routines may also override MASK or shift it left by SHFT bits. If MASK is non-zero, only the bits specified by MASK will appear in RVAL.”

 

The 3.15.5 version of the record seems to do what the documentation says:

 

(base) corvette:src/std/rec>grep -i mask mbbiRecord.c

    /* Initialize MASK if the user set NOBT instead */

    if (prec->mask == 0 && prec->nobt <= 32)

        prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;

 

Mark

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Mark Rivers via Tech-talk
Sent: Tuesday, September 15, 2020 10:55 AM
To: 'Eric Norum' <ericnorum at gmail.com>; Johnson, Andrew N. <anj at anl.gov>
Cc: tech-talk at aps.anl.gov (tech-talk at aps.anl.gov) <tech-talk at aps.anl.gov>
Subject: RE: mbbi record ignores mask?

 

The mbbo documentation in the record Wiki (https://wiki-ext.aps.anl.gov/epics/index.php/RRM_3-14_Multi-Bit_Binary_Output) says this:

 

MASK is used by device support routine to read the hardware register. Record support sets low order of MASK the number of bits specified in NOBT. Device support can shift this value.”

 

The 3.15.5 version of the mbbo record seems to do what the documentation says:

 

(base) corvette:src/std/rec>grep -i mask mbboRecord.c

    /* Initialize MASK if the user set NOBT instead */

    if (prec->mask == 0 && prec->nobt <= 32)

        prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;

 

Mark

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Mark Rivers via Tech-talk
Sent: Tuesday, September 15, 2020 10:47 AM
To: 'Eric Norum' <ericnorum at gmail.com>; Johnson, Andrew N. <anj at anl.gov>
Cc: tech-talk at aps.anl.gov (tech-talk at aps.anl.gov) <tech-talk at aps.anl.gov>
Subject: RE: mbbi record ignores mask?

 

Ø  The mbbi record in the couple of versions of base that Ive checked (3.15.5 and 3.15.7) don’t seem to use the MASK field.

 

I believe that is the responsibility of the device support.  asyn device support handles the mask.

 

Mark

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Eric Norum via Tech-talk
Sent: Tuesday, September 15, 2020 10:45 AM
To: Johnson, Andrew N. <anj at anl.gov>; tech-talk at aps.anl.gov
Subject: mbbi record ignores mask?

 

This is one of those things that seems impossible to have been wrong for so long that it makes me wonder if I’m misinterpreting what I’m reading.

The mbbi record in the couple of versions of base that Ive checked (3.15.5 and 3.15.7) don’t seem to use the MASK field.

 

wenorum@xildev5 223> pwd

/eda/epics/R3.15.7/base/src/std/rec

wenorum@xildev5 224> grep -n mask mbbiRecord.c

140:    if (prec->mask == 0 && prec->nobt <= 32)

141:        prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;

wenorum@xildev5 225> 

 

— 

Eric Norum

 

 

 

 


References:
mbbi record ignores mask? Eric Norum via Tech-talk
RE: mbbi record ignores mask? Mark Rivers via Tech-talk
RE: mbbi record ignores mask? Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: mbbi record ignores mask? Eric Norum via Tech-talk
Next: Re: mbbi record ignores mask? Johnson, Andrew N. 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: mbbi record ignores mask? Mark Rivers via Tech-talk
Next: Re: mbbi record ignores mask? Eric Norum 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, 15 Sep 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·