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  <20212022  2023  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: subArray behavior reading just 1 element
From: Lucas Russo via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Wed, 1 Sep 2021 16:43:02 -0300
Hello everyone,

I have a quick question,

I was trying to get subArray to read the second (or any other than the first) element from a waveform record, like this:

cat << EOF > test.db
record(waveform, "wave") {
    field(INP, "[1, 2, 3, 4, 5]")
    field(NELM, "5")
    field(FTVL, "DOUBLE")
    field(PINI, "YES")
    field(FLNK, "subarr")
}

record(subArray, "subarr") {
    field(INP, "wave")
    field(INDX, "1")
    field(MALM, "1")
    field(NELM, "1")
    field(FTVL, "DOUBLE")
}
EOF

softIoc -d test.db

But it doesn't work as subarr INDX >= MALM (https://github.com/epics-base/epics-base/blob/R7.0.4/modules/database/src/std/rec/subArrayRecord.c#L308), and it always return the first element of the waveform. Is that the expected behavior? This seems odd to me as INDX refers to an index of the waveform record and MALM refers to the maximum number of elements of the subarray record. But I might be missing something.

Using EPICS 7.0.4.1

Thanks!

Lucas

Navigate by Date:
Prev: Re: mbboDirect Bx fields don't update on alarm change Johnson, Andrew N. via Tech-talk
Next: Re: subArray behavior reading just 1 element Lucas Russo 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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: mbboDirect Bx fields don't update on alarm change Johnson, Andrew N. via Tech-talk
Next: Re: subArray behavior reading just 1 element Lucas Russo 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  <20212022  2023  2024 
ANJ, 01 Sep 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·