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  2016  2017  2018  2019  2020  2021  2022  2023  2024  <2025 Index 1994  1995  1996  1997  1998  1999  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  <2025
<== Date ==> <== Thread ==>

Subject: Re: aai to multiple states
From: "Dr. Simon Friederich via Tech-talk" <tech-talk at aps.anl.gov>
To: Žiga Oven <ziga.oven at cosylab.com>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 3 Jun 2025 16:23:55 +0200

Hi Ziga,

Thanks for your reply. I thought about mbbiDirect too, but I don't see how to set individual labels? I can only find the B0-BF and B10-B1F fields.

https://epics-base.github.io/epics-base/mbbiDirectRecord.html

Can you show me an example how to do that?

Best regards
Simon

Am 03.06.2025 um 11:42 schrieb Žiga Oven:

Hi Simon,

 

If you substitute your mbbi record for mbbiDirect [1] you can access individual bits by fields B1, B2, …
The 9 bi records give you a way to individually label and alarm states for each individual Boolean value.

Regarding the processing of your calc_output record: is the value in info_get record changing?
You can also set your aai record (info_get) to post monitor every time it processes by configuring the MPST field [2] to Always (this should be  a default setting, but you should verify or set it specifically if needed).

 

Best regards,

 

Žiga Oven


[1] https://docs.epics-controls.org/projects/base/en/latest/mbbiDirectRecord.html

[2] https://docs.epics-controls.org/projects/base/en/latest/aaiRecord.html#monitor-parameters

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Dr. Simon Friederich via Tech-talk
Sent: Monday, June 2, 2025 16:21
To: tech-talk at aps.anl.gov
Subject: aai to multiple states

 

Dear EPICS community,

I have an aai record "info_get" that contains multiple values.

 

#=============== Information array ===============

 

record(aai,

"$(P)$(R)slot$(SLOT):info_get") {

 

    field(DESC,

"Retrieve slot status")

 

    field(DTYP,

"stream")

 

    field(INP,

"@infus.proto getSingleSlotconf($(SLOT))

$(PORT)")

 

    field(NELM,

"26")

 

    field(FTVL,

"DOUBLE")

 

    field(PREC, 1)

 

}

 

9 values of these are booleans representing different outputs that are on or off (0 or 1).

I could create now, e.g. 9 binary inputs to map these values.

 

record(bi,

"$(P)$(R)slot$(SLOT):output_preAB_get")

{

 

    field(INP,  "$(P)$(R)slot$(SLOT):info_get.VAL[4]

CP")

 

    field(ZNAM,

"OPEN")

 

    field(ONAM,

"CLOSED")

 

}

 

record(bi,

"$(P)$(R)slot$(SLOT):output_preCD_get")

{

 

    field(INP,  "$(P)$(R)slot$(SLOT):info_get.VAL[5]

CP")

 

    field(ZNAM,

"OPEN")

 

    field(ONAM,

"CLOSED")

 

}

 

...# and so on

 

Yet, I wanted to ask, if there is another way of mapping this subarray to one record containing the states.
I thought the mbbi would suite, but unfortunately, it does not work as expected:

 

record(calc,

"$(P)$(R)slot$(SLOT):_calc_output")

{

 

    field(DESC,

"OUTPUT module: aai to byte")

 

    field(CALC,

"(A<<8) | (B<<7) | (C<<6) | (D<<5) | (E<<4) | (F<<3) | (G<<2) | (H<<1) | I")

 

    field(INPA,

"$(P)$(R)slot$(SLOT):info_get.VAL[4] CP")

 

    field(INPB,

"$(P)$(R)slot$(SLOT):info_get.VAL[5]")

 

    field(INPC,

"$(P)$(R)slot$(SLOT):info_get.VAL[6]")

 

    field(INPD,

"$(P)$(R)slot$(SLOT):info_get.VAL[7]")

 

    field(INPE,

"$(P)$(R)slot$(SLOT):info_get.VAL[8]")

 

    field(INPF,

"$(P)$(R)slot$(SLOT):info_get.VAL[9]")

 

    field(INPG,

"$(P)$(R)slot$(SLOT):info_get.VAL[10]")

 

    field(INPH,

"$(P)$(R)slot$(SLOT):info_get.VAL[11]")

 

    field(INPI,

"$(P)$(R)slot$(SLOT):info_get.VAL[12]")

 

}

 

record(mbbi,

"$(P)$(R)slot$(SLOT):output_get") {

 

    field(DESC,

"OUTPUT module: Outputs")

 

    field(DTYP,

"Raw Soft Channel")

 

    field(INP,  "$(P)$(R)slot$(SLOT):_calc_output

CP")

 

    field(ZRST,

"Ausgang Vorstufe A,B")

 

    field(ONST,

"Ausgang Vorstufe C,D")

 

    field(TWST,

"Ausgang Vorstufe E,F")

 

    field(THST,

"Ausgang A")

 

    field(FRST,

"Ausgang B")

 

    field(FVST,

"Ausgang C")

 

    field(SXST,

"Ausgang D")

 

    field(SVST,

"Ausgang E")

 

    field(EIST,

"Ausgang F")

 

}

 

(By the way:
The CP flag at INPA does not seem to be sufficient to process my calc record. At least for my tests I needed to caput .._calc_output.PROC 1 to process it).

Thank you very much in advance!

Best regards
Simon

 

Replies:
Re: aai to multiple states Paduan Donadio, Marcio via Tech-talk
References:
aai to multiple states Dr. Simon Friederich via Tech-talk
RE: aai to multiple states Žiga Oven via Tech-talk

Navigate by Date:
Prev: Re: Communicating with Bechoff I/O through EPICS sibylle ducroize via Tech-talk
Next: Re: [EXTERNAL] Re: Suggestions wanted on IOC hardware Hill, Jeff via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  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  <2025
Navigate by Thread:
Prev: RE: aai to multiple states Žiga Oven via Tech-talk
Next: Re: aai to multiple states Paduan Donadio, Marcio via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  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  <2025
ANJ, 03 Jun 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·