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  2018  2019  2020  2021  <20222023  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: ai - record unfortunately does not behave as I expect it to
From: Heinz Junkes via Tech-talk <tech-talk at aps.anl.gov>
To: Ralph Lange <ralph.lange at gmx.de>
Cc: EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Thu, 11 Aug 2022 17:12:42 +0200
Thank you, yes the "Raw Soft Channel" was the deciding point.
(it's probably just too hot here in Berlin).
Heinz

> On 11. Aug 2022, at 17:09, Ralph Lange via Tech-talk <tech-talk at aps.anl.gov> wrote:
> 
> The plain "Soft Channel" Device Support does not convert - you would have to write into VAL.
> To use RVAL you need to...
> 	• use the "Raw Soft Channel" Device Support that converts
> 	• set the LINR field to select the type of conversion you want. (Probably "SLOPE" in your case.)
> Also, CP in an OUT link does not make sense - you need PP to trigger the target.
> 
> Cheers,
> ~Ralph
> 
> 
> On Thu, 11 Aug 2022 at 17:01, Heinz Junkes via Tech-talk <tech-talk at aps.anl.gov> wrote:
> I probably didn't take something into account, but unfortunately I don't see what I did wrong.
> 
> I have modified the ai- record from dbExample1.db:
> 
> record(ai, "$(user):aiExample")
> {
>         field(DESC, "Analog input")
> #       field(INP, "$(user):calcExample.VAL  NPP NMS")
>         field(ASLO, "2")
>         field(EGU, "Counts")
>         field(HOPR, "20")
>         field(LOPR, "0")
>         field(HIHI, "16")
>         field(HIGH, "6")
>         field(LOW, "4")
>         field(LOLO, "2")
>         field(HHSV, "MAJOR")
>         field(HSV, "MINOR")
>         field(LSV, "MINOR")
>         field(LLSV, "MAJOR")
> }
> 
> and write into this record (RVAL) with a calcout record:
> 
> record(calcout, "$(user):dummOut") {
>   field(INPA, "$(user):calcExample.VAL MS CP")
>   field(CALC, "A")
>   field(OUT , "$(user):aiExample.RVAL CP")
> }
> 
> RVAL is also changed, but VAL remains 0:
> 
> (base) hactar:iocmyExample junkes$ camonitor junkes:aiExample.RVAL junkes:aiExample.VAL junkes:aiExample.ASLO
> junkes:aiExample.RVAL          2022-08-11 16:52:57.014817 2 LOLO MAJOR
> junkes:aiExample.VAL           2022-08-11 16:52:57.014817 0 LOLO MAJOR
> junkes:aiExample.ASLO          2022-08-11 16:52:57.014817 2 LOLO MAJOR
> junkes:aiExample.RVAL          2022-08-11 16:52:58.016001 3 LOLO MAJOR
> junkes:aiExample.RVAL          2022-08-11 16:52:59.017708 4 LOLO MAJOR
> junkes:aiExample.RVAL          2022-08-11 16:53:00.015190 5 LOLO MAJOR
> junkes:aiExample.RVAL          2022-08-11 16:53:01.017940 6 LOLO MAJOR
> junkes:aiExample.RVAL          2022-08-11 16:53:02.015414 7 LOLO MAJOR
> junkes:aiExample.RVAL          2022-08-11 16:53:03.018187 8 LOLO MAJOR
> junkes:aiExample.RVAL          2022-08-11 16:53:04.018058 9 LOLO MAJOR
> 
> In the record reference manual :
> 
> If the device support sets the RVAL field, the LINR field controls how this gets converted into engineering units and placed in the VAL field as follows:
> 
> 1. RVAL is converted to a double and ROFF is added to it.
> 2. If ASLO is non-zero the value is multiplied by ASLO.
> 3. AOFF is added.
> 
> Danke,  for taking a look,
> Heinz


References:
ai - record unfortunately does not behave as I expect it to Heinz Junkes via Tech-talk
Re: ai - record unfortunately does not behave as I expect it to Ralph Lange via Tech-talk

Navigate by Date:
Prev: Re: ai - record unfortunately does not behave as I expect it to Florian Feldbauer via Tech-talk
Next: Re: Issue with RULES_BUILD of seq 2.2.9 Han Lee 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  2018  2019  2020  2021  <20222023  2024 
Navigate by Thread:
Prev: Re: ai - record unfortunately does not behave as I expect it to Ralph Lange via Tech-talk
Next: Re: ai - record unfortunately does not behave as I expect it to Florian Feldbauer 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  2018  2019  2020  2021  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·