|
|
Experimental Physics and
| ||||||||||||||||||||||||||||||||||||||||||||||
|
|
Correction:
In "from a single PV" I meant "from a single record".
From: André Favoto <andrefavotto at outlook.com>
Sent: Monday, 07 September 2026 12:46:00 To: EPICS Tech Talk <tech-talk at aps.anl.gov>; Ralph Lange <ralph.lange at gmx.de> Subject: Re: Naming bits in an mbbiDirect record
By optional I meant that they could be empty strings, sorry for not being clear. Something like these (copied from mbbi):
I think 26 chars like the limit on mbbi state strings should be enough (although they serve a different purpose).
But you are right that they would allocate sizeof(STRING[26]) regardless of content, so defining it or not wouldn't make a difference and could impact memory-constrained hardware, indeed. Optional was a wrong word on my end.
I'm not sure if I understand the point of changing the PV name though. I am proposing the creation of an
extra field that defines a label. Something like the following:
That on pvget would look like:
(not needing to have two strings for each, like ZNAM and ONAM, just a plain label).
If rewiring happens, one would need to change BxNM fields with their names, yes. But for the bi records, we would need
at least to change which of the bits the record looks to on it's input link, right?
Say, record(bi, "SomeState") { field(INP, "myStatusBits.B1 CP") } would need to be modified if the information is no longer on B1 or myStatusBits. Perhaps ZNAM and ONAM too, if they are not generic like ON/OFF.
Going further, if these bit names are defined dynamically the PLC for example, with asyn we could have something like:
This would ensure that users can get a full overview of all statuses like this from a single PV, instead of 33 (1+NBits):
![]()
(The screen above was composed by looking at myStatusBits + individual stringin records with each name).
Best Regards,
André Favoto
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
Sent: Monday, September 7, 2026 11:45 To: EPICS Tech Talk <tech-talk at aps.anl.gov> Subject: Re: Naming bits in an mbbiDirect record On Mon, 7 Sept 2026 at 10:39, André Favoto <andrefavotto at outlook.com> wrote:
There are no optional fields in the EPICS database.
Assuming the normal EPICS string length of 40 bytes, adding 32 fields would add more than a kByte to every existing instance of mbbiDirect records, independent of using the labels or not, also on embedded systems with limited memory.
Adding bi records for every used bit is the intended and normal use of the mbbiDirect record type. mbbiDirect is a slim implementation of a status word, the bi records have all per-bit configuration: description, value strings for
0 and 1, alarm/severity settings, etc.
Conceptual aspect: In my experience, the address information of a signal is part of its implementation and should *not* be part of its PV name.
Using your approach, with the mbboDirect bit field as the PV name, any rewiring (changing the address of a specific bit in the status word or moving the bit to another word) will force a change in the PV name, which is a major pain.
(Consider how to handle archiver requests across that change.)
If you use bi records for bits, their PV names can properly express meaning/function and are not affected by rewiring or any other implementation changes.
The user is in full control of info item names - you can pair if you want to.
Cheers,
~Ralph
| ||||||||||||||||||||||||||||||||||||||||||||||
| ANJ, 07 Sep 2026 |
·
Home
·
News
·
About
·
Talk
·
Base
·
Modules
·
Extensions
·
· Distributions · Download · Documents · Links · Licensing · |