Dear Ralph,
Thank you very much for
the hints and explanation. I am currently trying to implement
your advice.
I got rid of the calc
record, the mbbi + Raw Soft Channel works nicely.
I've started with two
types of modules and created the "Disable<type>" records.
#=============== bo Disable records =============== record(bo, "$(P)$(R)slot$(SLOT):_disable_4chunit") { field(DESC, "Disable 4CH UNIT records") field(VAL, "1") # disabled by default field(ZNAM, "enable") field(ONAM, "disable") }
record(bo, "$(P)$(R)slot$(SLOT):_disable_output") { field(DESC, "Disable OUTPUT records") field(VAL, "1") field(ZNAM, "enable") field(ONAM, "disable") }
Unfortunately the
SDIS="Disable<type> CA" does not work as expected or at
least from what I see, all types are processed. Here an example
#=========================================== # Valid data (4CH UNIT, OUTPUT) #=============== Read data valid =========== record(bi, "$(P)$(R)slot$(SLOT):validdata_get") { field(DESC, "Read data is valid") field(INP, "$(P)$(R)slot$(SLOT):info_get.VAL[3] CP") field(ZNAM, "NO") field(ZSV, "MAJOR") field(ONAM, "YES") field(OSV, "NO_ALARM") field(DISV, "1") # Disable record if DISA=DISV field(SDIS, "$(P)$(R)slot$(SLOT):_disable_4chunit CA") # Sets DISA value }
If I read the reference
manual correctly it should work like this:
A not-empty SDIS-field sets the value for DISA and if DISA=DISV,
then the record should be disabled, right?
Or the other way around: If DISA!=DISV, the record is enabled.
Although my bo records
"_disable_4chunit" are set correct (the VAL fields are 0 for
this modules and 1 else), the DISA is 1 for all my slots and
hence all "validdata_get" are enabled.
What am I missing?
Best regards
Simon
Am 27.05.2025 um 09:24 schrieb Ralph
Lange:
Hi Simon,
Without going into the specifics of your application...
Device type mapping:
No need for the calc - the mbbi can do the mapping
itself. Use the "Raw Soft Channel" device support (in Base)
to have the mbbi do RVAL-to-index mapping.
Disabling:
There are several ways, of course ... I would indeed use
disabling.
Add one "Disable<type>" bo record to each
per-device-type database, with a default setting of
1=disabled. Point all hardware-connected records of that
device type to this Disable<type> using
SDIS="Disable<type> CA". (CA option to avoid pulling
all records into the same lock set.)
The missing link:
Connecting its SELL to your mapping mbbi, use e.g. a
dfanout record with SELM=specified to write a 0 (=enabled)
to the Disabled<type> record of the recognized card
type. (Don't forget the PP flag to process the
Disabled<type>.)
The whole thing is a template per slot that you
instantiate for each slot that is used. (Or the max number
of slots if you don't care about unconnected records.)
Cheers,
~Ralph
ps. Database links work only locally, Channel Access
links work locally and remotely.
CP on input links means "set up a monitor and process me
when the value changes" - which is perfectly legal in any
case.
- Replies:
- Re: Enable or select records Ralph Lange via Tech-talk
- References:
- Enable or select records Dr. Simon Friederich via Tech-talk
- Re: Enable or select records Ralph Lange via Tech-talk
- Navigate by Date:
- Prev:
Re: External: Re: Communicating with Bechoff I/O through EPICS Timo Korhonen via Tech-talk
- Next:
Job Openings at BESSY/HZB Gotz, Malte 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: Enable or select records Ralph Lange via Tech-talk
- Next:
Re: Enable or select records Ralph Lange 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>
|