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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Asyn PortDriver readFloat64 |
From: | Douglas Henrique C. de Araújo via Tech-talk <[email protected]> |
To: | Mark Rivers <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Tue, 4 Dec 2018 15:06:27 +0000 |
Hi Mark, Thank you for your quickly response, it was totally enlightening. For the temperature I can put a periodic scan and will works very well. Probably I'll need do a polling loop to get the current state of the equipment. For this, I will use the indicate example as base to my driver. Thank you very much again Best regards Douglas Em 04/12/2018 11:52, Mark Rivers escreveu:
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> -- 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 |