Experimental Physics and Industrial Control System
|
Hi Torsten, Ø The PLC gives us some names for enmums, resulting in a call to Ø pC_->doCallbacksEnum() doCallbacksEnum() is only intended to be called when an enum value changes at run-time, i. e. after iocInit. For enums that the driver determines
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
Hi Torsten,
Ø The PLC gives us some names for enmums, resulting in a call to
Ø pC_->doCallbacksEnum()
doCallbacksEnum() is only intended to be called when an enum value changes at run-time, i.e. after iocInit. For enums that the driver determines at initialization you should simply implement
the asynPortDriver::readEnum() method. Device support will call your driver during iocInit to read the enum values/strings/severities for all records with enum VAL fields.
testAsynPortDriver has an example here:
https://github.com/epics-modules/asyn/blob/a94a78987a99b1c36bbd641a67341069dc5d627e/testAsynPortDriverApp/src/testAsynPortDriver.cpp#L340
It also has an example of using doCallbacksEnum(), which it does when the vertical gain is changed at run time.
https://github.com/epics-modules/asyn/blob/a94a78987a99b1c36bbd641a67341069dc5d627e/testAsynPortDriverApp/src/testAsynPortDriver.cpp#L374
Mark
From: Core-talk <core-talk-bounces at aps.anl.gov>
On Behalf Of Johnson, Andrew N. via Core-talk
Sent: Tuesday, February 27, 2024 12:41 PM
To: Torsten Bögershausen <tboegi at edom.se>; core-talk at aps.anl.gov
Subject: Re: pC_->doCallbacksEnum() coming too early
Hi Torsten,
I assume this an Asyn port driver; what is triggering the I/O that results in your code doing that callback? The callback shouldn't happen until after the EPICS global
interruptAccept is non-zero, any earlier than that and the IOC and records won't be ready for device support to call it. The asynPortDriver code looks like
it ignores all such calls before then. If the code needs something to trigger that processing it could register an initHook and wait for the value
initHookAfterInterruptAccept, which is only sent once (i.e. it doesn't get repeated if the IOC is paused), or for
initHookAfterDatabaseRunning which is repeated after an IOC pause is rescinded.
HTH,
- Andrew
Complexity comes for free, Simplicity you have to work for.
Hej experts, I have an IOC that talks to a PLC-ish system. The PLC gives us some names for enmums, resulting in a call to pC_->doCallbacksEnum()
However, most often the response from the PLC comes back to the IOC before the record has registered
This Message Is From an External Sender
This message came from outside your organization.
Hej experts,
I have an IOC that talks to a PLC-ish system.
The PLC gives us some names for enmums, resulting in a call to
pC_->doCallbacksEnum()
However, most often the response from the PLC comes back
to the IOC before the record has registered for the callback.
And the enums in the mbbi record are not updated.
Delaying the polling does work around this problem -
but is there a better solution ?
|
- Replies:
- Re: pC_->doCallbacksEnum() coming too early Ralph Lange via Core-talk
- References:
- pC_->doCallbacksEnum() coming too early Torsten Bögershausen via Core-talk
- Re: pC_->doCallbacksEnum() coming too early Johnson, Andrew N. via Core-talk
- Navigate by Date:
- Prev:
RE: pvAccess assert error Mark Rivers via Core-talk
- Next:
Build failed: EPICS Base 7 base-7.0-1107 AppVeyor 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>
- Navigate by Thread:
- Prev:
Re: pC_->doCallbacksEnum() coming too early Johnson, Andrew N. via Core-talk
- Next:
Re: pC_->doCallbacksEnum() coming too early Ralph Lange 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>
|
ANJ, 28 Feb 2024 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|