![]() |
![]() ![]()
Experimental Physics and
| ||||||||||||||
|
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. 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: Thank you very much in
advance! Best regards
| ||||||||||||||
ANJ, 03 Jun 2025 |
![]() · Download · Search · IRMIS · Talk · Documents · Links · Licensing · |