g+
g+ Communities
Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013 
<== Date ==> <== Thread ==>

Subject: Re: initializing a waveform record
From: Gasper Pajor <gasper.pajor@cosylab.com>
To: "'tech-talk@aps.anl.gov'" <tech-talk@aps.anl.gov>
Date: Tue, 06 Jul 2004 14:41:30 +0200
Hello Mark, Steve

We came across the same problem - filling the waveform with static data - and the best solution we found so far is the use of state notation language.

Here is an example code for what we do :

double arr[100];
assign arr to "CURVES:SINE";
%% int i;

......
......
state init
{
when()
{


           %%  for(i=0;i<100;i++) arr[i] = sin(0.1*i);
           %%  j=0;
           pvPut(arr);
         } state somethingelse
      }

......
......

We use sequencer and 2.0.8 and epics base 3.14.x.
Hope this helps,

Gasper Pajor,
Cosylab


Singleton, SJ (Steve) wrote:


Hello Mark

I use EPICS subroutine (SUB) records to initialise waveform records, with
the attached code. Because of the limitation on the number of arguments to
a SUB record it is only possible to initialise up to nine elements of the
array from one SUB record. The arguments of the SUB record are as follows:


INPA - the waveform record
INPB - the index number of the first waveform element to be set up by this
SUB record.
INPC - the number of elements to be initialised by the SUB record, in the
range 1 - 9.
INPD to INPL - the values to which the elements are to be set.


Hope this helps.

Regards
Steve Singleton


-----Original Message----- From: owner-b-tech-talk@mail.bessy.de [mailto:owner-b-tech-talk@mail.bessy.de]On Behalf Of Mark M. Ito Sent: 04 July 2004 02:14 To: tech-talk@aps.anl.gov Subject: initializing a waveform record


What is there a standard way to initialize the values of a waveform record?


I saw Andrei Liyu's post from this past Apr. 8. He seems to imply that the standard is to call dbPutField. Does one write a VxWorks subroutine to make this call and load the array?

The array is of floats, and will be about 100 elements long. The values are static; they never change.

I also looked at the waveform record description in the Record Reference Manual. That did not help me given my lack of basic understanding of this stuff.

I also skimmed the contents of the Application Developer's Guide. No help for me there either.





Replies:
Re: initializing a waveform record Andy Foster
Re: initializing a waveform record Ned Arnold
References:
RE: initializing a waveform record Singleton, SJ (Steve)

Navigate by Date:
Prev: RE: initializing a waveform record Singleton, SJ (Steve)
Next: Re: initializing a waveform record Andy Foster
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013 
Navigate by Thread:
Prev: RE: initializing a waveform record Singleton, SJ (Steve)
Next: Re: initializing a waveform record Andy Foster
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·