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: ai - record unfortunately does not behave as I expect it to
From: Heinz Junkes via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Thu, 11 Aug 2022 17:00:37 +0200
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

Replies:
Re: ai - record unfortunately does not behave as I expect it to Ralph Lange via Tech-talk
Re: ai - record unfortunately does not behave as I expect it to Florian Feldbauer via Tech-talk

Navigate by Date:
Prev: Re: pypva, PvObject and NTTable Veseli, Sinisa via Tech-talk
Next: Re: ai - record unfortunately does not behave as I expect it to Ralph Lange 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: Scan overflow issue Ralph Lange via Tech-talk
Next: Re: ai - record unfortunately does not behave as I expect it to Ralph Lange 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 ·