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  <20152016  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  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: ai record doesn't do convert for floats?
From: <[email protected]>
To: <[email protected]>, <[email protected]>
Date: Fri, 18 Sep 2015 21:21:10 +0000
Hi Matt,

I think this is basically because RVAL is an integer and the conversions happen when you convert the integer to a float. Any device support that returns float must put it in the VAL field and return a do not convert status. I have always thought we should have a record identical to the ai record but with a floating point RVAL.

Cheers,

Nick Rees
Principal Software Engineer           Phone: +44 (0)1235-778430
Diamond Light Source                  Fax:   +44 (0)1235-446713


-------- Original message --------
From: "Pearson, Matthew R."
Date:18/09/2015 21:51 (GMT+00:00)
To: "[email protected] list"
Subject: ai record doesn't do convert for floats?


Hi,

I’m wondering why it’s convention that the ai record doesn’t use its convert function when using some types of device support routines. The analog value read function should return status=2 according to the IOC developers guide, and this causes it to not do any LINR type conversion on the VAL field.

I’m wondering why I can’t do this:

record(ai, "$(S):SE:CH1:PVRaw")
{
  field(DESC, "Process Variable CH1")
  field(DTYP, "asynFloat64")
  field(INP, "@asyn(n1,0,1)")
  field(SCAN, "I/O Intr")
  field(LINR, “SLOPE”)
  field(ESLO, “0.1”)
}

whatever the device support routine passes to the ai record is what I get in VAL. So to do slope conversions I have to pass it to another ai record using soft channel device support.

Although, I’ve found that using asynInt32 support does return 0 to the record support, causing the conversion to happen to VAL. I believe ai support in streamDevice does the same.

Cheers,
Matt

Spallation Neutron Source
ORNL







-- 
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom



References:
ai record doesn't do convert for floats? Pearson, Matthew R.

Navigate by Date:
Prev: ai record doesn't do convert for floats? Pearson, Matthew R.
Next: Re: ai record doesn't do convert for floats? Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: ai record doesn't do convert for floats? Pearson, Matthew R.
Next: Re: ai record doesn't do convert for floats? Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·