On 07/15/2015 06:48 AM, Deepika Thakur wrote:
> Thanks for the reply..But what my query is I want to use only two
> subArrays.. if i set MALM=72, INDX=36, NELM=36
> I get all 36 elements required + extra 36 zero's.
>
> record(subArray, data2) {
> field(SCAN, "Passive")
> field(DTYP, "Soft Channel")
> field(FLNK, "data21")
> field(FTVL, "CHAR")
> field(INP, "datavme.VAL")
> field(MALM, "72")
> field(NELM, "36")
> field(INDX, "36")
> }
> and output I get is:
>
> data2 72 -113 -113 -128 -128 -128 -128 -113 -113 -113 -113 -113 -113
> -113 -113 -113 -113 -113 -113 -113 -113 -113 -113 -128 -128 -113 -113
> -128 -128 -113 -113 -113 -113 -113 -113 -113 -113 0 0 0 0 0 0 0 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>
> So if it is possible to set fields of second subArray such that i can
> get next 36 values of my input array..
What program are you using to fetch and display the array elements? The
trailing zero values are just how Channel Access works when your client
program fetches the maximum number of elements for the channel using the
ca_get API. If you're using the caget program, try giving it the flag -c
("use ca_get_callback") which should then only display the first 36
elements, or the flag -#36 to fetch only the first 36 elements.
If you can't modify your client then you'll have to add a third subArray
record with NELM=MALM=36 and INDX=0, or you could create a single aSub
record to do the job of all 3 records (but you would have to write some
C code to do the actual data extraction).
- Andrew
--
Light thinks it travels faster than anything but it is wrong.
No matter how fast light travels, it finds the darkness has
always got there first, and is waiting for it.
-- Terry Pratchett, Reaper Man
- References:
- SubArray ishita bhatia
- Re: SubArray Andrew Johnson
- Navigate by Date:
- Prev:
RE: Stepper Motor Controllers Mark Rivers
- Next:
JCA 2.1.2 on 64 bit Ubuntu Frank Gribbin
- 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 Andrew Johnson
- Next:
Conversion to Hexadecimal ishita bhatia
- 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
|