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  <20182019  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  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Asyn PortDriver readFloat64
From: Mark Rivers via Tech-talk <[email protected]>
To: Douglas Henrique C. de Araújo <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Tue, 4 Dec 2018 13:52:38 +0000
Hi Douglas,


> So, i intend to implement this function inside the
> asynPortDriver readFloat64, as at the tutorial measCompTutorial, and to
> create a ai input record with SCAN=I/0 Intr.
> But now is my doubt, when (and how) this readFloat64 is call?

If you implement reading the temperature in readFloat64 then it will only work with records that are periodically scanned (SCAN=1 second, etc.).

If you want the record to work with SCAN=I/O Intr then you need to read the temperature inside a polling loop in your driver.  This lets you update much faster than the normal periodic SCAN rates.

There is an example of doing that for digital inputs on page 41 in the tutorial.
https://github.com/epics-modules/measComp/blob/master/documentation/measCompTutorial.pdf
?You would just need to change that to read your temperature, and call setDoubleParam rather than setUIntDigitalParam.

If you write the poller then periodically scanned records will still work, without your driver needing to implement the readFloat64() function.  The reason is that your poller has put the latest value in the parameter library, and the asynPortDriver::readFloat64() base-class function will return the current value from the parameter library.

Mark

________________________________
From: [email protected] <[email protected]> on behalf of Douglas Henrique C. de Araújo via Tech-talk <[email protected]>
Sent: Tuesday, December 4, 2018 6:44 AM
To: [email protected]
Subject: Asyn PortDriver readFloat64

Dear all,

I am developing a driver for a equipment using asynPortDriver, and I
need a record temperatureActual_RBV that call a function of a dynamic
library that ask to detector the actual temperature and the detector
return the value. So, i intend to implement this function inside the
asynPortDriver readFloat64, as at the tutorial measCompTutorial, and to
create a ai input record with SCAN=I/0 Intr.

But now is my doubt, when (and how) this readFloat64 is call?

Thank you.

Best regards

--
Douglas Henrique C. de Araujo
Software de Operação das Linhas de Luz
Laboratório Nacional de Luz Síncrotron - (LNLS)
Centro Nacional de Pesquisa em Energia e Materiais (CNPEM)
[email protected] | +55 (19) 3512 1228
www.lnls.br<http://www.lnls.br>


Replies:
Re: Asyn PortDriver readFloat64 Douglas Henrique C. de Araújo via Tech-talk
References:
Asyn PortDriver readFloat64 Douglas Henrique C. de Araújo via Tech-talk

Navigate by Date:
Prev: Asyn PortDriver readFloat64 Douglas Henrique C. de Araújo via Tech-talk
Next: RE: asynDriver - UDP server Joao Afonso 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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Asyn PortDriver readFloat64 Douglas Henrique C. de Araújo via Tech-talk
Next: Re: Asyn PortDriver readFloat64 Douglas Henrique C. de Araújo 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  <20182019  2020  2021  2022  2023  2024 
ANJ, 04 Dec 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·