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: Mark Rivers <[email protected]>
To: "[email protected]" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Thu, 10 Mar 2016 14:27:10 +0000
Hi Gennaro,

The mbbo record has 16 enum choices.  However, the values associated with each enum choice are 32-bit integers.  So you can access all 32 bits in your register using an mbbo record.

Mark

________________________________________
From: [email protected] [[email protected]]
Sent: Thursday, March 10, 2016 8:19 AM
To: Mark Rivers
Cc: [email protected]
Subject: RE: mbbo/mbbi and bits subset

Hi,
I just realized that a mbbo can contain up to 16 bit value...
it is possible to specify that a record can contain a 32 bit value ?

the record documentation does not provide this information...

Regards,
Gennaro

On Thu, 10 Mar 2016, [email protected] wrote:

>
> Hi Mark,
> I did it with your suggestion by asynMask and everything works fine !!
>
> Thanks,
> Gennaro
>
> On Thu, 10 Mar 2016, Mark Rivers wrote:
>
>> Hi Gennaro,
>>
>> You can do what you want using the asynUInt32Digital support and the
>> @asynMask INP syntax.
>>
>> record(mbbo,"Acquire") {
>>    field(DTYP,"asynUInt32Digital")
>>    field(OUT,"@asynMask(myPort , 0, 0x3 , 1.0) ")
>>    field(ZRST,"Start acquire")
>>    field(ONST,"Stop acquire")
>>    field(ZRVL,"0x2")
>>    field(ONVL,"0x3")
>> }
>>
>> You can use multiple mbbo/mbbi records to access different adjacent bits in
>> your register using this technique.
>>
>> The asyn device support uses the NOBT, SHFT, and MASK fields of the
>> mbbo/mbbi records documented here:
>>
>> https://wiki-ext.aps.anl.gov/epics/index.php/RRM_3-14_Multi-Bit_Binary_Output
>>
>> Mark
>>
>>
>> ________________________________________
>> From: [email protected] [[email protected]] on
>> behalf of [email protected] [[email protected]]
>> Sent: Thursday, March 10, 2016 4:54 AM
>> 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
>>
>>
>
>

--
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 [email protected]
References:
mbbo/mbbi and bits subset [email protected]
RE: mbbo/mbbi and bits subset Mark Rivers
RE: mbbo/mbbi and bits subset [email protected]
RE: mbbo/mbbi and bits subset [email protected]

Navigate by Date:
Prev: RE: mbbo/mbbi and bits subset [email protected]
Next: RE: mbbo/mbbi and bits subset [email protected]
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 [email protected]
Next: RE: mbbo/mbbi and bits subset [email protected]
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 ·