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  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Waveform record I/O interrupt. asyn
From: Mark Rivers <[email protected]>
To: Vishnu Patel <[email protected]>
Cc: techtalk <[email protected]>
Date: Sat, 22 Feb 2014 21:01:20 +0000
If your driver can have new values every 50 nanoseconds, and can do that continuously, then there is no way that EPICS record processing can keep up.  You need to rethink your approach.
________________________________
From: [email protected] [[email protected]]
Sent: Saturday, February 22, 2014 2:28 PM
To: Mark Rivers
Cc: techtalk
Subject: Re: Waveform record I/O interrupt. asyn

In my case the drive can have new value at maximum 50ns fast. Presently, i am testing 2 consecutive interrupts. But that may be continuous or burst.

Thanks
Vishnu





From: Mark Rivers <[email protected]>
Sent: Sat, 22 Feb 2014 20:21:00
To: Vishnu Patel <[email protected]>, "techtalk " <[email protected]>
Subject: Re: Waveform record I/O interrupt. asyn
> In devAsynXXXArray.c dbScanUnlock has been used before scanIoRequest(). Can it create problem for repeating same value?

No, it does not matter the order there. scanIoRequest just queues a request to process the record later in a callback thread.

> My assumption is as dbScanUnlock and before scanIoRequest() execute, value change and second time triggers interrupt. This result same value for both interrupts.

The problem is that your driver does a second callback after the first callback has called scanIoRequest but before the callback thread has processed the record.

> I checked interrupt callback code in devAsynInt32.c where epicsMutexUnlock has been used after scanIoRequest().

That does not matter. In devAsynInt32 that is a private mutex, so the callback does not call dbScanLock(). That mutex protects the ring buffer so that 2 threads are not accessing the ring buffer at the same time.

In devAsynInt32 if another driver callback occurs before the record processes then the new value is placed in the ring buffer. This can handle the situation of short bursts where the driver callbacks happen faster than record processing. But if the driver callbacks continue to happen faster than record processing, then the ring buffer will overflow and some values will be dropped.

This is much harder to handle with arrays because it may involve allocating and copying large amounts of data in order to buffer it.

You said your driver can produce new values that are only 1 microsecond apart. Does it do this continuously, or only in short bursts? If short bursts, then how many rapid callbacks in a burst? Are your arrays only 3 elements long in the real application, or was that just for testing?

Mark


________________________________
From: [email protected] [[email protected]] on behalf of Vishnu Patel [[email protected]]
Sent: Friday, February 21, 2014 12:35 PM
To: techtalk
Subject: Waveform record I/O interrupt. asyn

Hello,
I am facing problem in I/O Interrupt for waveform record in the asyn. If the value of waveform record change very fast then some of the samples missing or same sample repeat twice even if before p_interruptInt32Array->callback () function the value is scanned properly by driver. But i think the read value is pushed to the callback but it is not handle that much fast in the callback.


I checked the code for interruptCallbackInput in devAsynXXXArray.h.
In devAsynXXXArray.c dbScanUnlock has been used before scanIoRequest(). Can it create problem for repeating same value?
My assumption is as dbScanUnlock and before scanIoRequest() execute, value change and second time triggers interrupt. This result same value for both interrupts.

I checked interrupt callback code in devAsynInt32.c where epicsMutexUnlock has been used after scanIoRequest().


Thank you

Vishnu




[http://sigads.rediff.com/RealMedia/ads/adstream_nx.ads/www.rediffmail.com/signatureline.htm@Middle]<http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?>
Get your own FREE website, FREE domain & FREE mobile app with Company email.
Know More ><http://track.rediff.com/click?url=___http://businessemail.rediff.com/company-email-hosting-services?sc_cid=sign-1-10-13___&cmp=host&lnk=sign-1-10-13&nsrv1=host>

[http://sigads.rediff.com/RealMedia/ads/adstream_nx.ads/www.rediffmail.com/signatureline.htm@Middle]<http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?>
Get your own FREE website, FREE domain & FREE mobile app with Company email.
        Know More ><http://track.rediff.com/click?url=___http://businessemail.rediff.com/company-email-hosting-services?sc_cid=sign-1-10-13___&cmp=host&lnk=sign-1-10-13&nsrv1=host>


References:
Re: Waveform record I/O interrupt. asyn Vishnu Patel

Navigate by Date:
Prev: Re: Waveform record I/O interrupt. asyn Vishnu Patel
Next: epics on beaglebone D Peter Siddons
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Waveform record I/O interrupt. asyn Vishnu Patel
Next: Re: Waveform record I/O interrupt. asyn Vishnu Patel
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·