Although using the subArray record is the easiest for the job you just described, if you want to do more complicated processing e.g. extract X values in X records or do some convolution/transformation, etc... a subroutine record may be more appropriate.
Long ago, it was called genSub. Now it is called asub and is included in base.
> From:
[email protected]> To:
[email protected];
[email protected]> Subject: RE: Use element of waveform as input to ai record
> Date: Mon, 9 Sep 2013 21:33:40 +0000
>
> Hi Phil,
>
> I think you can do this with the subarray record, taking advantage of the fact that the scalar value
> of an array is the value of its first element. I haven't tried this, because I would in any case do it
> with an acalcout record. To write element 23 of myArray.VAL to myScalar.VAL, whenever myArray
> is posted, I would do this:
>
> acalc.INAA = "myArray.VAL CP"
> acalc.CALC = "aa[23,23]"
> acalc.OUT = "myScalar.VAL PP"
>
> Tim
> ________________________________________
> From:
[email protected] [
[email protected]] on behalf of Phillip Sorensen [
[email protected]]
> Sent: Monday, September 09, 2013 4:16 PM
> To: TechTalk EPICS
> Subject: Use element of waveform as input to ai record
>
> Hello all,
>
> Sorry if this is obvious thing I have missed, but I am not finding any
> obvious way to do what I am trying.
>
> I would like the value of an ai record to be set to the value of an
> element in a waveform, and update when the waveform up dates.
>
> Thanks,
>
> Phil Sorensen
> CHESS
>
>
>