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

Subject: RE: [AsynPortDriver] "Multiple interrupt callbacks between processing" warning with multiple arrays
From: Mark Rivers <rivers@cars.uchicago.edu>
To: 'Pawel Plewinski' <pplewinski@dmcs.pl>, "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Tue, 11 Apr 2017 16:24:53 +0000
Hi Pawel,

What is the SCAN field of your waveform record?  I suspect it is probably periodic ("1 second", etc.).  For this application you should set it to SCAN="I/O Intr".  Then the waveform record will process each time your driver does a callback to device support.  If the record is periodically processing at 1 second and your driver is doing callbacks faster than 1 Hz then you will see the error you report.

Mark


-----Original Message-----
From: tech-talk-bounces@aps.anl.gov [mailto:tech-talk-bounces@aps.anl.gov] On Behalf Of Pawel Plewinski
Sent: Tuesday, April 11, 2017 8:49 AM
To: tech-talk@aps.anl.gov
Subject: [AsynPortDriver] "Multiple interrupt callbacks between processing" warning with multiple arrays

Hi,

I've recently written asyn-based device support for a custom device 
communicating over PCIe. One of its functions is to periodically 
retrieve 4 waveforms from 4 channels, which is done in a separate 
thread, from which the callback function is called to notify asyn about 
change. I heavily based the code on the AsynPortDriver example.
The driver works, however if the update rate is lower than 1 second, 
strange warning appears in the console at the time of every refresh (and 
that's only for one of 4 channels), namely:

2017/04/11 15:42:08.682 PIEZO:OSC-CH0-WAVEFORM 
devAsynFloat64Array::interruptCallbackInput
\000\000\000\000\000@\205?\000\000\000\000\000\300\202?\000\000\000\000\000\000\204?\000\000\000\000\000\000\204?\000\000\000\000\000\300\202?\000\000\000\000\000\000\204?\000\000\000\000\000@\205?\000\000\000\000\000\000\204?\000\000\000\000\000\300\202?\000\000\000\000\000\000\204?
2017/04/11 15:42:08.682 PIEZO:OSC-CH0-WAVEFORM 
devAsynFloat64Array::processCommon, warning, multiple interrupt 
callbacks between processing

The parameters passed to the top level constructor are
    : asynPortDriver(portName,
                     4, /* maxAddr */
                     (int)NUM_SCOPE_PARAMS,
                     asynInt32Mask | asynFloat64Mask | 
asynFloat64ArrayMask | asynEnumMask | asynDrvUserMask, /* Interface mask 
*/
                     asynInt32Mask | asynFloat64Mask | 
asynFloat64ArrayMask | asynEnumMask,  /* Interrupt mask */
                     ASYN_MULTIDEVICE, /* asynFlags.  This driver does 
not block and it is not multi-device, so flag is 0 */
                     1, /* Autoconnect */
                     0, /* Default priority */
                     0) /* Default stack size*/

The readback thread code:

void piezoPortDriver::readbackTask(void)
{
    while (1) {
            bool stopped = false;

            lock();
            auto new_data = osc->fetch_data(vtim, vdat);
            unlock();

            if (!stopped)
            {
                lock();
                this->osc_update_trigger();
                unlock();
            }
         callParamCallbacks();

         for (int i = 0; i < 4; i++){
           doCallbacksFloat64Array(vdat[i].data(), vdat[i].size(), 
P_OscWaveform, i);
         }
         usleep(100000);
     }
}

The fetch_data method reads four 1000-element double vectors from PCIe.

Could you give me some suggestions what may be wrong?

Regards,
Paweł Plewiński
Department of Microelectronics and Computer Science
Lodz University of Technology

Replies:
Re: [AsynPortDriver] "Multiple interrupt callbacks between processing" warning with multiple arrays Ralph Lange
Re: [AsynPortDriver] "Multiple interrupt callbacks between processing" warning with multiple arrays Paweł Plewiński
References:
[AsynPortDriver] "Multiple interrupt callbacks between processing" warning with multiple arrays Paweł Plewiński

Navigate by Date:
Prev: RE: CA client within Asyn Mooney, Tim M.
Next: RE: CA client within Asyn Mark S. Engbretson
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
Navigate by Thread:
Prev: [AsynPortDriver] "Multiple interrupt callbacks between processing" warning with multiple arrays Paweł Plewiński
Next: Re: [AsynPortDriver] "Multiple interrupt callbacks between processing" warning with multiple arrays Ralph Lange
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
ANJ, 11 Apr 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·