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

Subject: Re: Waveform Record Device Support
From: Till Straumann <strauman@slac.stanford.edu>
To: graham.cox@stfc.ac.uk
Cc: tech-talk@aps.anl.gov
Date: Mon, 07 Jun 2010 21:04:00 -0500
Graham.

The waveform record support 'exports' references to
the memory pointed to by BPTR as well as it's size
(NELM) via the record's 'cvt_dbaddr()' member.

This means that other parts of EPICS potentially hold
a copy of this information which would become
inconsistent if you change either.
Hence, device-support *must not* change BPTR or NELM.

However, it is legal to set NORD to the number of elements
that are currently stored in the waveform and NORD may
be any number smaller than NELM.

NORD is also what is returned by the record's get_array_info()
member and it is correctly handled by dbGetField() but unfortunately
the CA server (and client) ignores this feature of the database
and always returns the number of elements the client asks for.

Normally, clients use ca_element_count() to find out how many
elements are in an array but that boils down to 'NELM'.

You could let your client read NORD first and then read the
corresponding number of array elements but unfortunately,
there is no way to do this in an atomic operation :-(

It would IMHO be a desirable feature to be able to tell
the CA client/server that you want to read the current
number of elements and the data in a single operation.

BTW: Another feature that is implemented in the database
(reading from an offset into an array) is IIRC not available
through CA.

-- Till

On 06/07/2010 04:06 AM, graham.cox@stfc.ac.uk wrote:
Hi All,

I am integrating a turn-by-turn BPM system into EPICS and would like to
store the raw BPM pickup data in a waveform record.  Due to the nature
of the system, each run can result in a different number of samples for
each BPM pickup, so the array size is unknown in advance and could
potentially be different every run.

Is it possible to resize the number of waveform record elements in my
device support, or do I have to size the waveform record in advance for
the maximum number of samples that could be expected.  Most of the
examples of waveform device support I see read the nelm field and return
this fixed amount of data via the records bptr.

Thanks,

Graham


References:
Waveform Record Device Support graham.cox

Navigate by Date:
Prev: Re: Waveform Record Device Support emmanuel_mayssat
Next: CA Lab - New interface between LabVIEW? and EPICS Carsten Winkler
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: Re: Waveform Record Device Support Dirk Zimoch
Next: Re: RE: Waveform Record Device Support nda
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·