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

Subject: Re: interrupt read data in int32Driver example
From: timesir via Tech-talk <tech-talk at aps.anl.gov>
To: GAGET Alexis <alexis.gaget at cea.fr>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Fri, 7 Jul 2023 16:19:23 +0800

Your response is greatly appreciated and has been very helpful. Thank you.

However, I still want to know how to simulate interrupt reads through software in the official int32Driver example.




在 2023/7/7 15:39, GAGET Alexis 写道:

Hello,

I’m not familliar with your driver example (and not so much with asyn), but for the mechanism of the i/o intr to work, some functions have to be declared in the driver himself.

I have a device support example here (without asyn):

https://gitlab.com/formation-epics/anf-2022/4_1-device-support/-/blob/main/top_correction/exerciceDevSupApp/src/MyDeviceExampleIOIntr.c

 

My example is really pointless in real situation because the iocIntr is triggered  by an iocShell function for the example:

https://gitlab.com/formation-epics/anf-2022/4_1-device-support/-/blob/main/top_correction/exerciceDevSupApp/src/commandIocShell.c

 

But in real situation it has to be triggered somehow by the device.

 

 

De : Tech-talk <tech-talk-bounces at aps.anl.gov> De la part de timesir via Tech-talk
Envoyé : vendredi 7 juillet 2023 08:18
À : tech-talk at aps.anl.gov
Objet : interrupt read data in int32Driver example

 

Dear community,

I would like to learn about the usage of epics interrupt. I found an example routine called `int32Driver` (asyn/iocBoot/ioctestEpics/st.cmd and asyn/testEpicsApp/src). In the `st.cmd` script, there is a record instance that I want to use to run an interrupt because it has `SCAN=I/O Intr`. Here is the example record instance:

record(ai,"asyndevAiInt32A0") {
    field(SCAN,"I/O Intr")
    field(DTYP,"asynInt32")
    field(INP,"@asyn( int32 , 0 , 1.0) ")
    field(LINR,"LINEAR")
    field(EGUF,"100.0")
    field(EGUL,"-100.0")
    field(PREC,"3")
}

After running `epics` using the above command, I tried to read the data generated by the interrupt using `caget asyndevAiInt32A0`. However, the return value of `caget` did not change. How can I make `asyndevAiInt32A0` generate a read data interrupt to software simulate a hardware interrupt that produces new data?


Replies:
Re: interrupt read data in int32Driver example Ralph Lange via Tech-talk
References:
interrupt read data in int32Driver example timesir via Tech-talk
RE: interrupt read data in int32Driver example GAGET Alexis via Tech-talk

Navigate by Date:
Prev: Re: Error in alarm-logger.sh Eusebio Naif Al-Soliman Fuentes via Tech-talk
Next: Re: Record process when restore using autosave Ralph Lange 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  2022  <20232024 
Navigate by Thread:
Prev: RE: interrupt read data in int32Driver example GAGET Alexis via Tech-talk
Next: Re: interrupt read data in int32Driver example Ralph Lange 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  2022  <20232024 
ANJ, 07 Jul 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·