EPICS Controls 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  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Waveform Record Device Support
From: "Krempasky Juraj" <[email protected]>
To: <[email protected]>
Cc: [email protected]
Date: Mon, 7 Jun 2010 12:26:23 +0200
Hi Graham,

Try to combine waveform with subArray like this:

 record(waveform, "$(PREFIX):rawData") {
  field(NELM, "3000000")
  field(FTVL, "DOUBLE") 
  field(FLNK, "$(PREFIX):data")
}

record(subArray, "$(PREFIX):data") {
  field(DTYP, "Soft Channel")
  field(INP, "$(PREFIX):rawData")
  field(NELM, "3000000")
  field(MALM, "3000000")
  field(FTVL, "DOUBLE") 
}

On the subArray side you can adjust the NELM to the actual array size,
for example saved in some other EPICS record. The subArray's NELM can be
run-time modified, but keep in mind that NELM<MALM. 

Regards

Juraj 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Dirk Zimoch
Sent: Montag, 7. Juni 2010 11:30
To: [email protected]
Cc: [email protected]
Subject: Re: Waveform Record Device Support

Hi Graham,

The waveform record allocates memory for the waveform at boot time,
according to NELM. All links (including local db links on the same IOC)
store the address of the memory at the time they connect. Thus the
memory must not be re-allocated after booting. Channel access clients
receive the size information when they connect. There is no support in
Channel Access for dynamic array sizes.

As you can see, no part of EPICS is prepared to deal with changing
number of elements. You have to set NELM to the maximum possible number
of elements. The device support may change NORD to indicate the actual
number of valid elements. But a client has to connect to an array with
NELM elements. It has to monitor NORD in addition to VAL to find out the
real array size. The array is filled up with 0 if NORD < NELM.

Best regards,
Dirk

[email protected] 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
Re: Waveform Record Device Support Dirk Zimoch

Navigate by Date:
Prev: Re: Waveform Record Device Support Dirk Zimoch
Next: CSS/Eclipse Introduction from EPICS Meeting Kasemir, Kay
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Waveform Record Device Support Dirk Zimoch
Next: Re: Waveform Record Device Support emmanuel_mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·