> 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>
- References:
- Waveform record I/O interrupt. asyn Vishnu Patel
- Navigate by Date:
- Prev:
Re: Waveform record I/O interrupt. asyn Ralph Lange
- 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
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Waveform record I/O interrupt. asyn Benjamin Franksen
- 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
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|