Hi Mark,
The return value from an ao device support's init_record() routine
doesn't cause LINR to be changed at all, it only affects whether the
RVAL field value gets propagated back to the VAL field at startup.
However unless the device's write_ao() routine actually looks at the
LINR field, the user may set it without that having any affect on the
value that gets passed to the driver.
In most cases the unit conversion and adjustment fields do not affect
the values output or input by device support that takes or return the
value in engineering units. Device support *may* use the values in those
fields (ESLO, EOFF, ASLO, AOFF etc) if the author wants to, but I can't
think of any that actually do so. They would have to duplicate some of
the code from the record though, since its calculations only go to/from
a 32-bit integer value in RVAL, thus losing data. I could see that as
being useful for this kind of case, but documentation for the device
support should make it clear for users that it is doing this.
- Andrew
On 11/19/2013 11:57 AM, Mark Rivers wrote:
I don’t think you can do these types of conversions with the asynFloat64
device support for the ao record. devasynFloat64.c::initAo always
returns 2, which means “do not convert”. In aoRecord.c that means that
LINR is always left at the default value of menuConvertNO_CONVERSION.
So this means that the ao record never does any conversions with the
asynFloat64 deice support.
Mark
*From:*[email protected]
[mailto:[email protected]] *On Behalf Of *Benoit
*Sent:* Tuesday, November 19, 2013 11:16 AM
*To:* [email protected]
*Subject:* Convertion for asynFloat64
Hi,
I would like to use mV in my EPICS folder and send V to my driver.
I have done conversion correctly using asynInt32 type but it doesn't
work with asynFloat64.
Do you have any suggestion?
record(ao, "$(S):$(D)_$(C):CavVoltSet")
{
field(DTYP, "asynFloat64")
field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))cavvolt")
field(PINI, "YES")
field(LINR,"SLOPE")
field(ESLO,"0.001")
field(PREC, "2")
}
I have try with
field(LINR,"SLOPE")
field(ASLO,"0.001")
and also with
field(LINR,"LINEAR")
field(EGUF,"1000")
field(EGUL,"0")
But nothing seems to change when I receive my value in my asynPortDriver.
Regards,
--
Benoit RAT
www.neub.co.nr <http://www.neub.co.nr>
--
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock
- References:
- Convertion for asynFloat64 Benoit
- RE: Convertion for asynFloat64 Mark Rivers
- Navigate by Date:
- Prev:
RE: Substitutions defaults and tricks Emmanuel Mayssat
- Next:
RE: How to archive PVs in epics which are deployed in labview Emmanuel Mayssat
- 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: Convertion for asynFloat64 Mark Rivers
- Next:
Re: Convertion for asynFloat64 J. Lewis Muir
- 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
|