Looks like you have dimensioned your subArrays to have 16 elements. caget reports all 16 values even if only first four have been populated.
Zen
> -----Original Message-----
> From: [email protected] [mailto:tech-talk-
> [email protected]] On Behalf Of Zhang, Jihong (Julia)
> Sent: Tuesday, January 18, 2011 1:52 PM
> To: '[email protected]'
> Cc: Zhang, Jihong (Julia)
> Subject: About subArray trailing zeros
>
> Hello,
>
> I'm trying to use subArray record type to split up a larger waveform record
> into smaller waveforms:
> I am starting with a waveform record with 16 elements:
>
> The first subArray is at index 0
> The second subArray is at index 4
> The 3rd subArray is at index 8
> The 4th subArray is at index 12
>
> I have a question on the trailing zeros. why does caget report trailing zeros; is
> this a bug?
>
> The following is the simple testing for this problem:
>
> ==============output for the simple testing:
> caput -a wave_test 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Old : wave_test
> 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 New : wave_test 16 1 2 3 4 5 6 7 8 9 10 11 12
> 13 14 15 16
>
> caget subArr1
> subArr1 16 1 2 3 4 0 0 0 0 0 0 0 0 0 0 0 0 /* I only need the first 4 numbers,
> no training 0 */
>
> caget subArr2
> subArr2 16 5 6 7 8 0 0 0 0 0 0 0 0 0 0 0 0
>
> caget subArr3
> subArr3 16 9 10 11 12 0 0 0 0 0 0 0 0 0 0 0 0
>
> caget subArr4
> subArr4 16 13 14 15 16 0 0 0 0 0 0 0 0 0 0 0 0
>
> =============Db definition for the simple testing:
>
> record(subArray, subArr1) {
> field(DESC, "ayb array 1")
> field(NELM, "4")
> field(INP, "wave_test.VAL")
> field(INDX, "0")
> field(FTVL, "SHORT")
> field(MALM, "16")
> }
>
> record(subArray, subArr2) {
> field(DESC, "ayb array 2")
> field(NELM, "4")
> field(INP, "wave_test.VAL")
> field(INDX, "4")
> field(FTVL, "SHORT")
> field(MALM, "16")
> }
>
> record(subArray, subArr3) {
> field(DESC, "ayb array 3")
> field(NELM, "4")
> field(INP, "wave_test.VAL")
> field(INDX, "8")
> field(FTVL, "SHORT")
> field(MALM, "16")
> }
>
> record(subArray, subArr4) {
> field(DESC, "ayb array 4")
> field(NELM, "4")
> field(INP, "wave_test.VAL")
> field(INDX, "12")
> field(FTVL, "SHORT")
> field(MALM, "16")
> }
>
> record(fanout, mylinker) {
> field(FLNK, "subArr1")
> field(LNK1, "subArr3")
> field(LNK2, "subArr2")
> field(LNK3, "subArr4")
> }
>
> record(waveform, wave_test) {
> field(NELM, "16")
> field(FTVL, "SHORT")
> field(EGU, "Counts")
> field(SCAN, "Passive")
> field(FLNK, "mylinker")
> }
>
>
> Thanks.
>
> Julia Zhang
>
- References:
- About subArray trailing zeros Zhang, Jihong (Julia)
- Navigate by Date:
- Prev:
Re: StreamDevice/ASYN connection to a Telnet port Dimitrios Tsifakis
- Next:
Building base-3.14.12 for a specific target jun-ichi.odagiri
- 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
- Navigate by Thread:
- Prev:
About subArray trailing zeros Zhang, Jihong (Julia)
- Next:
Re: About subArray trailing zeros Andrew Johnson
- 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
|