Hi Yann,
- I noticed that for asynFloat64 interface, there is no auto call to the ‘readFloat64’ method when DB load at ioc boot which is the behaviour am expecting.
That does not seem correct to me. The asynFloat64 device support for the ao record does do an initial read from the driver in this line:
https://github.com/epics-modules/asyn/blob/a94a78987a99b1c36bbd641a67341069dc5d627e/asyn/devEpics/devAsynFloat64.c#L623
What is your evidence that the readFloat64 method is not being called?
- I tried longout and bo on that interface and there are no initial calls to ‘readInt32’.
Both of those records should make an initial call to readInt32.
The longout record is done in this line:
https://github.com/epics-modules/asyn/blob/a94a78987a99b1c36bbd641a67341069dc5d627e/asyn/devEpics/devAsynInt32.c#L1080
The bo record is done in this line:
https://github.com/epics-modules/asyn/blob/a94a78987a99b1c36bbd641a67341069dc5d627e/asyn/devEpics/devAsynInt32.c#L1184
The initial value read from the driver is only used in the record if the readFloat64 or readInt32 methods return asynSuccess. Is your driver returning asynSuccess?
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Yann Mandza via Tech-talk
Sent: Monday, April 22, 2024 12:09 PM
To: tech-talk at aps.anl.gov
Subject: Disable output record using asynInt32 interface automatic read from the hardware
Hi all,
I have an asyn port driver using the asynInt32 and asynFloat64 interfaces for different output record types. Am using the asynDrvUser to create the driver parameters.
I noticed that for asynFloat64 interface, there is no auto call to the ‘readFloat64’ method when DB load at ioc boot which is the behaviour am expecting. However, for asynInt32 interface, Ao records tend to make a call
to the ‘readInt32’ method somehow automatically. I tried longout and bo on that interface and there are no initial calls to ‘readInt32’. Tried to follow this thread.
https://epics.anl.gov/tech-talk/2019/msg01402.php, but am still puzzled on how to control this feature on AO records.
My DB looks somehow like this, am my driver has these asynflags: ASYN_CANBLOCK | ASYN_MULTIDEVICE
record( ao, "$(P)$(R):DelayedTripAction-O") {
field(DTYP,"asynInt32")
field(OUT,"@asyn($(PORT))INT_PARAM1($(ADDR))")
}
record(mbbo,"$(P)$(R):R2") {
field(DTYP,"asynInt32")
field(OUT,"@asyn($(PORT)) INT_PARAM2($(ADDR))")
}
Best Regards
Yann