g+
g+ Communities
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  <20112012  2013  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013 
<== Date ==> <== Thread ==>

Subject: RE: About subArray trailing zeros
From: "Szalata, Zenon M." <zms@slac.stanford.edu>
To: "Zhang, Jihong (Julia)" <julia-33@slac.stanford.edu>, "'tech-talk@aps.anl.gov'" <tech-talk@aps.anl.gov>
Cc: "Zhang, Jihong \(Julia\)" <julia-33@slac.stanford.edu>
Date: Tue, 18 Jan 2011 15:42:16 -0800
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: tech-talk-bounces@aps.anl.gov [mailto:tech-talk-
> bounces@aps.anl.gov] On Behalf Of Zhang, Jihong (Julia)
> Sent: Tuesday, January 18, 2011 1:52 PM
> To: 'tech-talk@aps.anl.gov'
> 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  <20112012  2013 
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  <20112012  2013 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·