EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  <19981999  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  1996  1997  <19981999  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: MBBI & mask
From: "Paul Sichta" <[email protected]>
To: <[email protected]>
Date: Fri, 25 Sep 1998 09:00:30 -0400
A few months ago the ability to specify the SHFT parameter for the mbbi
record (for soft/raw soft device type) was added.  I now realize that the
mbbi record's  MASK feature is not applied for soft or raw soft device
types.    Inspecting the source mbbiRecord.c confirms that the mask is not
used in record support.   Without the mask,  higher-order bits (those beyond
NOBT) affect the value and cause invalid states.

1)  I propose that the bit mask in the mbbi record be used for all device
types,  to strip out bits "above" the bit range of interest.
    a)  The mask is (now) created based on NOBT (number of bits).
    b)  The mask would be applied to rval after the value has been shifted
by SHFT number of bits.  For hardware devices,  the shifting occurs in
device support (prior to the mbbi record). Hardware device types should have
their SHFT field set to zero.

A code segment from mbbiRecord.c is shown below,  along with the proposed
new line.


        recGblGetTimeStamp(pmbbi);
        if(status==0) { /* convert the value */
                unsigned long   *pstate_values;
                short           i;
                unsigned long rval = pmbbi->rval;

                if(pmbbi->shft>0) rval >>= pmbbi->shft;
                rval = rval & pmbbi->mask;                          /*
proposed new line 25SEP98  */
                if (pmbbi->sdef){
                        pstate_values = &(pmbbi->zrvl);
                        pmbbi->val = 65535;



2)  In an effort to figure out this problem,  I recompiled a "test" version
of mbbiRecord.c (ran gnumake in base/src/rec).   The new mbbiRecord.o was
installed in the target's bin directory.  I ran gnumake in my application's
src directory,  and rebooted the IOC.   The mbbiRecord operation was the
same as before.  Why didn't the new object file run on the IOC?


--
Paul Sichta
Princeton Plasma Physics Laboratory
609-243-3477


Replies:
Re: MBBI & mask Marty Kraimer

Navigate by Date:
Prev: where to find PMAC Controller support ? Goetz Pfeiffer
Next: Re: MBBI & mask Rozelle Wright
Index: 1994  1995  1996  1997  <19981999  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: where to find PMAC Controller support ? Andy Foster
Next: Re: MBBI & mask Marty Kraimer
Index: 1994  1995  1996  1997  <19981999  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 ·