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  <20162017  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  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: mbbo/mbbi and bits subset
From: <[email protected]>
To: <[email protected]>
Date: Thu, 10 Mar 2016 11:40:35 +0000
You can use the NOBT and SHFT fields to specifiy a subset of bits.
This is straightforward for input - simply read the whole register into an mbbiDirect record then have mbbi records use that record as their input using NOBT and SHFT to specify which bits to mask off.

For output it is more complicated. The whole word will be written to the record however you specify the subset of bits you are interested in. Do you want the other bits to be all zeros, or whatever you last wrote, or does it not matter?

Pete


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: 10 March 2016 10:54
To: [email protected]
Subject: mbbo/mbbi and bits subset


Hi,
I'm using mbbo and mbbi record types to write and read some registers from/to ASYN driver I'm developing;

some registers refers to a single aspect of acquisition (e.g. channel threshold) and with a simple mbbo record to write and a mbbi record to read back, everything works fine...

other registers refers to a setup/control functions and using the same mbbo/mbbi approach works fine if the user address (read/write) every time the whole register;

I know mbboDirect for bitwise access of a record value but is there a method to address (read/write) through a record a "bits subset" of a "main" mbbo record ?

e.g. acquisition control:

         bit[16...2]	<don't care>

 	bit[1...0]
 	  11		stop acquisition
 	  10		start acquisition
 	  01		do something...
 	  00 		do something...

which is a simple method to access "directly" bitset [0...1] in order to have a record I can use to write 11 (3) to stop acquisition,
10 (2) to start acquisiton and so on ?

Thanks in advance,
Gennaro

--
Gennaro Tortone
INFN Napoli
Italy
tel: +39 81 676169

"Computer Science is no more about computers
     than astronomy is about telescopes."
     - Edsger Dijkstra


Replies:
RE: mbbo/mbbi and bits subset Mark Rivers
References:
mbbo/mbbi and bits subset [email protected]

Navigate by Date:
Prev: RE: mbbo/mbbi and bits subset Mark Rivers
Next: RE: mbbo/mbbi and bits subset Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: mbbo/mbbi and bits subset Andrew Johnson
Next: RE: mbbo/mbbi and bits subset Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·