EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20222023  2024  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: RE: AsynInt32 SCAN=I/O Intr response
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: Eric Norum <ericnorum at gmail.com>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 24 Feb 2022 15:46:50 +0000

Hi Eric,

 

I am bringing this thread back to tech-talk, because I believe I understand the problem.

 

Ø  The only difference in the initAi and initLi in devAsynInt32.c is that initAi calls ‘converrtAi’

 

That is not true, initAi calls getBounds(), but initLi does not.

 

    /* Don't call getBounds if we already have non-zero values from

     * parseLinkMask */

    if ((pPvt->deviceLow == 0) && (pPvt->deviceHigh == 0)) {

        pasynInt32SyncIO->getBounds(pPvt->pasynUserSync,

                                    &pPvt->deviceLow, &pPvt->deviceHigh);

    }

 

That is the solution to the mystery. 

 

The problem is that asynManager assumes that connections are always made by an asyn client (e.g. device support), either by pasynManager->queueRequest to a port with autoConnect=true or directly with a call to pasynCommon->connect().  However, as you have found there can be cases where this does not happen, because device support never actually calls the driver.  The record communicates with the driver only via driver callbacks, i.e. the driver calls the client function, not the other way around.  asynManager should be fixed so that if there is a driver callback on a specific port and address it marks that device as connected.

 

This issue will typically only show up for drivers with asynMultidevice=true.  The reason is that if multiDevice is false then all operations to the driver  are on address 0, and there is typically at least one record that talks directly to the driver, i.e. is not SCAN=I/O Intr.  So address 0 will show as connected.

 

Mark

 

 

From: Eric Norum <ericnorum at gmail.com>
Sent: Wednesday, February 23, 2022 8:31 PM
To: Mark Rivers <rivers at cars.uchicago.edu>
Subject: Re: AsynInt32 SCAN=I/O Intr response

 

Nope.

Same behaviour with 4-38.  connect routine is called with address of ai records, but not with longin records.  The only difference in the initAi and initLi in devAsynInt32.c is that initAi calls ‘converrtAi’, but I don’t see anything there that would affect whether or not my driver connect() method gets invoked.  So where does my connect() get called from?



I added the code to print the address — the connect routine is invoked for each of the ai records but not for the longin records.   Weird.  I see that I have a pretty old version of ASYN (R4-30) so I should update and try again.



On Feb 23, 2022, at 5:21 PM, Mark Rivers <rivers at cars.uchicago.edu> wrote:

 

I would add some debugging code to your connect routine.  Call pasynManager->getAddr(pasynUser) to print the device address for which exceptionConnect() is being called.  Is it being called for the ai addresses but not the longin addresses?  That would tell you something.

 

Mark

 

— 

Eric Norum

 

 

 

 


Replies:
Re: AsynInt32 SCAN=I/O Intr response Eric Norum via Tech-talk
References:
AsynInt32 SCAN=I/O Intr response Eric Norum via Tech-talk
RE: AsynInt32 SCAN=I/O Intr response Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: Recsync error Michael Davidsaver via Tech-talk
Next: Re: AsynInt32 SCAN=I/O Intr response Eric Norum 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  <20222023  2024 
Navigate by Thread:
Prev: Re: AsynInt32 SCAN=I/O Intr response Eric Norum via Tech-talk
Next: Re: AsynInt32 SCAN=I/O Intr response Eric Norum 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  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·