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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: subArray behavior reading just 1 element |
From: | Lucas Russo via Tech-talk <tech-talk at aps.anl.gov> |
To: | "Tagger, Jueri" <jtagger at bnl.gov>, EPICS Tech Talk <tech-talk at aps.anl.gov> |
Date: | Wed, 1 Sep 2021 16:57:43 -0300 |
Your MALM of subarray must be equal to NELM of waveform
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Lucas Russo via Tech-talk
Sent: Wednesday, September 1, 2021 3:43 PM
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Subject: subArray behavior reading just 1 element
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