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  <20122013  2014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: subArray problem
From: Andrew Johnson <anj@aps.anl.gov>
To: tech-talk@aps.anl.gov
Date: Mon, 18 Jun 2012 10:33:17 -0500
Hi Steve,

On 2012-06-18 Steve Hunt wrote:
> When I create a subArray record with MALM set to 1 (which is the
> default),  If I try to change the INDX field - INDX field gets reset to
> 0 !!!!

Sorry, that's the expected behariour...

> With another value of MALM, everything works as expected.

The MALM field defines the maximum number of elements that the subarray can 
fetch through its INP link.  If you don't change it or you make it negative, 
that maximum will be 1.  What you probably don't realize is that the subArray 
record works by fetching up to MALM elements from its source link, then 
deleting the first INDX elements from the beginning of the fetched dataset.

It has to do it that way because the Channel Access and Database Access 
routines that it uses to fetch the input link do not provide an API that says 
"fetch me this many elements starting at this offset"; the record has to make 
do with the "fetch me this many elements" routine.  As a result your 
subArray.MALM value has to be large enough to cover the largest number of 
elements you want plus the largest index.

- Andrew
-- 
Never interrupt your enemy when he is making a mistake.
-- Napoleon Bonaparte

References:
subArray problem Steve Hunt

Navigate by Date:
Prev: subArray problem Steve Hunt
Next: ASYN devEpics output record initialization Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: subArray problem Steve Hunt
Next: ASYN devEpics output record initialization Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·