On 5/2/23 09:48, Mark Rivers wrote:
Hi Michael,
At the EPICS Core workshop last week I made a comment that one limitation of Channel Access was that OPI clients are not informed when enum strings or values change, and so OPI displays don’t update to reflect these changes. I said that one needs to close the display and re-open it in order to see the changes.
Firstly, lets talk about how to check this with camonitor. Load up the following test database
$ cat menu.db
record(bi, "bi") {
field(ZNAM, "A")
field(ONAM, "B")
}
$ softIoc -d menu.db
The start camonitor subscribing to DBE_PROPERTY
$ camonitor -m p bi
bi <undefined> A UDF INVALID
Then from the IOC shell (or some other means) change ZNAM
epics> dbpf bi.ZNAM x
This should cause camonitor to print
bi <undefined> x UDF INVALID
You said this was because I was using a very old OPI client, i.e. medm. You said that modern clients handle this correctly, by having 2 subscriptions to the PV, one for the value and one for the metadata. You said that Phoebus is one of the clients that handles this correctly.
For reasons of backwards compatibility (what else...) this is not the default behavior.
https://control-system-studio.readthedocs.io/en/latest/preference_properties.html#pv-ca
I set the following phoebus properties to use "modern" CA features.
org.phoebus.pv.ca/dbe_property_supported=true
org.phoebus.pv.ca/variable_length_array=true
I just tested this with Phoebus. I used the asyn/testAsynPortClient application. In that application when the VerticalGain record is changed the enum choices for the VoltsPerDivSelect and VoltsPerDivSelect_RBV fields are changed.
VerticalGainRecord: https://github.com/epics-modules/asyn/blob/f9d492ed58f4bd730cf49ac7feccc201cd2b17b0/testAsynPortDriverApp/Db/testAsynPortDriver.db#L105 <https://github.com/epics-modules/asyn/blob/f9d492ed58f4bd730cf49ac7feccc201cd2b17b0/testAsynPortDriverApp/Db/testAsynPortDriver.db#L105>
Code where enum values for VoltsPerDivSelect are changed: https://github.com/epics-modules/asyn/blob/f9d492ed58f4bd730cf49ac7feccc201cd2b17b0/testAsynPortDriverApp/src/testAsynPortDriver.cpp#L369 <https://github.com/epics-modules/asyn/blob/f9d492ed58f4bd730cf49ac7feccc201cd2b17b0/testAsynPortDriverApp/src/testAsynPortDriver.cpp#L369>
It does callbacks to device support where the record values are changed: https://github.com/epics-modules/asyn/blob/f9d492ed58f4bd730cf49ac7feccc201cd2b17b0/asyn/devEpics/devAsynInt32.c#L726 <https://github.com/epics-modules/asyn/blob/f9d492ed58f4bd730cf49ac7feccc201cd2b17b0/asyn/devEpics/devAsynInt32.c#L726>
I have converted the medm .adl file for testAsynPortDriver to a Phoebus .bob file: https://github.com/epics-modules/asyn/blob/master/testAsynPortDriverApp/op/bob/autoconvert/testAsynPortDriver.bob <https://github.com/epics-modules/asyn/blob/master/testAsynPortDriverApp/op/bob/autoconvert/testAsynPortDriver.bob>
When I change the vertical Gain in Phoebus I observe exactly the same thing as in medm. The enum menu choices for VoltsPerDivSelect mbbo and the enum string for the selected VoltsPerDivSelect_RBV do not update automatically. They only update when I close the Phoebus window and re-open it.
I presume the behavior I observe with Phoebus must be due to one of the following 3 reasons:
1. The asyn code for updating enum values is incorrect.
2. The fact that the .bob file is autoconverted from medm rather than created natively in Phoebus is causing the undesired behavior.
3. Phoebus cannot in fact update the screen when enum values change.
Thanks,
Mark
- Replies:
- RE: OPI updates when enum strings/values change Mark Rivers via Core-talk
- References:
- OPI updates when enum strings/values change Mark Rivers via Core-talk
- Navigate by Date:
- Prev:
OPI updates when enum strings/values change Mark Rivers via Core-talk
- Next:
Re: OPI updates when enum strings/values change Andrew Johnson via Core-talk
- Index:
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:
OPI updates when enum strings/values change Mark Rivers via Core-talk
- Next:
RE: OPI updates when enum strings/values change Mark Rivers via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
<2023>
2024
2025
|