EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Waveform calaulation for each element
From: Andy Foster <[email protected]>
To: DING JIANGUO <[email protected]>
Cc: [email protected]
Date: Tue, 24 Jun 2003 10:29:39 +0100 (BST)
Hi Jianguo,

Please take a look at the "genSub" record. The code and
documentation are available from:

www.observatorysciences.co.uk/epics.htm

This is a general purpose subroutine record which can handle
arrays, scalars and even user defined structures. It allows
for up to 21 inputs and outputs. Each input
and output can be user specified as an array or a scalar. So
you could read in an array from a waveform record and scalar
values from your "ai" records, perform the calculation in
the subroutine, write the result in VALA, which would be
configured as an array. This could then be linked to another
waveform record.

If you decide to use it, please let me know if you have any problems.

Cheers,

Andy


On Tue, 24 Jun 2003, DING JIANGUO wrote:

> hi, all
>
> Has anyone implemented array processing with a
> subroutine record?
>
> I want to access the values in a waveform (WFM) record with a
> subroutine record, cacultate for each element and pass the array to the output.
>
>                 +-------+
>         WFM  -->|a   out|---->  WFM
>                 |       |
>         ai   -->|b      |
>                 |       |
>         ai   -->|c      |   for idx=0..499
>                 |       |       (a[idx] - b ) * c
>                 | SUB-  |
>                 | ROUT- |
>                 | INE   |
>                 +-------+
>
> Jianguo DING
> SSRF, Shanghai Institute of Nuclear Research
> Chinese Academy of Science
> EMAIL: [email protected]
>

--------------------------------------------------------------------
Observatory Sciences Limited    Email: [email protected]
William James House             Tel: 44 - (0)1223 - 508259
Cowley Road                     Fax: 44 - (0)1223 - 508258
Cambridge, CB4 0WX, UK          http://www.observatorysciences.co.uk


References:
Waveform calaulation for each element DING JIANGUO

Navigate by Date:
Prev: Re: Waveform calaulation for each element Noboru Yamamoto
Next: Re: Waveform calaulation for each element Alexei Dmitrovski
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Waveform calaulation for each element DING JIANGUO
Next: Waveform calaulation for each element DING JIANGUO
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·