Hi Lucas,
Please read the “Array Parameters” section of the Record Reference page for the subArray record. Jueri is correct if you need to be able to access any element of
the original waveform; if you only need one of the first 10 elements say, you can set MALM to 10.
- Andrew
Hi Jueri,
Sure. But then caget returns a waveform of MALM elements instead of just 1 element. I wanted to have a subarray of 1 element. Is that possible? Or does it even make sense to do with subarray?
Thanks,
Lucas
Your MALM of subarray must be equal to NELM of waveform
Hello everyone,
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
--
Complexity comes for free, simplicity you have to work for.
|