> I’m creating a display for my ioc which has an array of OR’d error bit values. I’m trying to decode those bits on my display using an array of Byte Monitor (leds).
> For the display to decode the bits correctly though, the Byte Monitor would have to display in hex rather than in binary. Is there a way to do that, or do I just have to
use some other approach?
If you have a value that’s now a plain number like a pressure reading but a collection of bits where the different bits mean different things, you can decode that on the IOC
by using mbbiDirect records that split each bit out, which is good for individual bits, or by using mbbi records that map bit patterns to distinct states.
The end result are then new PVs with distinct meaning.
Otherwise, you can do some decoding in the display:
The Text Update widget can display with Format=Hex and Precision for example set to 8 so you get “0x12345670”.
The LED widget has a “bit” property to have it indicate just one bit of the value.
The ByteMonitor widget can display for example 32 bits and show a label for each bit. That is useful for a basic “Status Register” display where each bit means something, but
you likely still want an mbbiDirect on your IOC so you can then create logic on the IOC that does something when for example some “Fault bit” is set.
-Kay