On 11/22/13 4:10 AM, Benoit wrote:
> Hi Lewis,
>
> about my previous problem I was wondering if I could do the conversion
> in one step with something similar as below (This does not work)
>
> record(ao, "$(S):$(D)_$(C):CavVSet")
> {
> field(DTYP, "asynFloat64")
> field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))cavvolt")
> field(VAL, "0")
> field(PREC, "2")
> }
> record(calcout, "$(S):$(D)_$(C):CavMilliVSet")
> {
> field(OUT, "$(S):$(D)_$(C):CavVSet PP")
> field(OCAL, "1000 * VAL")
> field(PINI, "YES")
> field(PREC, "1")
> }
>
>
> Actually I am doing as below, but I need a temporary record to perform
> this conversion, and It would be simpler to use one record less.
>
> record(ao, "$(S):$(D)_$(C):CavMilliVSet")
> {
> field(DESC, "CavMilliVSet Temporary Set Record")
> field(PINI, "YES")
> field(EGU, "mV")
> field(PREC, "1")
> }
> record(calcout, "$(S):$(D)_$(C):CavMilliVCalc")
> {
> field(OUT, "$(S):$(D)_$(C):CavVSet PP")
> field(CALC, "1000 * A")
> field(INPA, "$(S):$(D)_$(C):CavMilliVSet.VAL CP MS")
> field(PINI, "YES")
> }
Hi, Benoit.
I'm not sure what you're asking. There are two records in both of your
examples, so I don't see how the first one uses one less record than the
second.
Regardless, I think I see the problem with your first example. You have
your calculation expression in the OCAL field of the calcout record, but
it should instead be in the CALC field. The OCAL field is an additional
calculation expression that would only be used if you set the DOPT field
to "Use OCAL". But you don't need that. You should just use the CALC
field which will put the result of the expression in the VAL field which
will be written to the OUT link.
Lewis
- Replies:
- Re: Convertion for asynFloat64 J. Lewis Muir
- References:
- Convertion for asynFloat64 Benoit
- Re: Convertion for asynFloat64 J. Lewis Muir
- Re: Convertion for asynFloat64 Benoit
- Re: Convertion for asynFloat64 Benoit
- Navigate by Date:
- Prev:
EpicsSharp issues Christopher J. Pendleton
- 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
- Navigate by Thread:
- Prev:
Re: Convertion for asynFloat64 Benoit
- 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
|