Hi Amien,
On 03/18/2018 10:49 PM, Amien Crombie wrote:
> I'm using Base R3.14.12.3 running on a BeagleBone Black (os Ubuntu 14.04
> LTS) and please explain the easier way on Base 3.15 or >
For an IOC running a 3.15 or later release the CA server supports
server-side filters, one of which allows any CA client to request a
sub-set of an array field. Your ai records could thus be changed to look
like this instead without needing the subArray records at all:
record(ai, "$(dev):mychann$(chan)") {
field(DTYP, "Soft Channel")
field(INP, "$(dev):xcur.[$(chan)] CP")
}
By including the CP flag these records will automatically process
whenever the waveform updates, so you don't have to forward-link to them.
Documentation on the array filter is available at
https://epics.anl.gov/base/R3-15/5-docs/filters.html#Array-Filter-arr
HTH,
- Andrew
> On 2018/03/16 17:31, Andrew Johnson wrote:
>> Hi Amien,
>>
>> On 03/16/2018 09:19 AM, Amien Crombie wrote:
>>> I have a subarray record that looks like this:
>>>
>>> record(subArray, "$(dev):$(channame)") {
>>> field(SCAN, ".1 second")
>>> field(FTVL, "FLOAT")
>>> field(DTYP, "Soft Channel")
>>> field(INP, "$(dev):xcur") ## INP comes from a waveform of 8
>>> floats
>>> field(NELM, "1")
>>> field(MALM, "8")
>>> field(INDX, "$(chan)") ## chan macro starts at 0
>>> field(FLNK, "$(dev):mychan$(INDX)")
>> What are you trying to achieve with the above FLNK value? Did you mean
>> to use $(chan) instead of $(INDX)? Do you have 8 copies of this record,
>> one each for chan=1, chan=2 etc?
>>
>>> }
>>> record(ai, "$(dev):mychann$(chan)") {
>>> field(DTYP, "Soft Channel")
>>> }
>>>
>>> This is possibly not the right way to do it. Is there a better way?
>> I suspect you may be trying to extract each of the individual values
>> from the waveform into their own ai record, is that correct?
>>
>> Which version of EPICS Base are you using? There is an easier way than
>> creating 8 subArray records if you are using a 3.15 or later release of
>> Base.
>>
>> - Andrew
>>
--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
- References:
- SubArray to ai record Amien Crombie
- Re: SubArray to ai record Andrew Johnson
- Re: SubArray to ai record Amien Crombie
- Navigate by Date:
- Prev:
Asyn getting DTYP field in drvUserCreate() Konrad, Martin
- Next:
RE: Asyn getting DTYP field in drvUserCreate() Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
<2018>
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: SubArray to ai record Amien Crombie
- Next:
Re: SubArray to ai record Amien Crombie
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
<2018>
2019
2020
2021
2022
2023
2024
|