Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 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
<== Date ==> <== Thread ==>

Subject: Re: How access to an array value from a process variable using ca_array_get()?
From: Raquel Pérez Lázaro <rperez@ixion.es>
To: "J. Lewis Muir" <jlmuir@imca-cat.org>
Cc: tech-talk@aps.anl.gov
Date: Fri, 17 Feb 2017 10:00:33 +0100
Title: Raquel Pérez Lázaro

Hello,

Thank you very much for your prompt answer.

I found a really useful example in the CA Reference Manual.

Regards,

R. Perez

El 16.02.2017 a las 5:48 PM, J. Lewis Muir escribió:
On 02/15, Raquel Pérez Lázaro wrote:
Hello,

I am trying to read and write to an array value from a process
variable using ca_array_get() function, but it is no clear for me
how I should use this function in order to access to each element of
the array and print its value.

I would appreciate an example.

Thank you,

R. Perez
See the documentation for ca_array_get in the CA Reference Manual [1].
It suggests looking a "caExample.c in the example application created
by makeBaseApp.pl."  You can also look at the source code for the caget
program in EPICS Base 3.14 [2] (and 3.15 [3]) which has a caget function
which uses ca_array_get_callback or ca_array_get and also iterates over
the elements of the array and prints their values.

Regards,

Lewis

[1] http://www.aps.anl.gov/epics/base/R3-14/12-docs/CAref.html#ca_get
[2] http://bazaar.launchpad.net/~epics-core/epics-base/3.14/view/head:/src/catools/caget.c
[3] http://bazaar.launchpad.net/~epics-core/epics-base/3.15/view/head:/src/ca/client/tools/caget.c


--

 

Raquel Pérez Lázaro

System Engineer

 

 

IXION

Julián Camarillo, 21B – 3º
28037 Madrid, España

Phone: +34 91 440 18 33
Ph. dir: +34 91 440 18 48
FAX: +34 91 30 45 410

 

rperez@ixion.es

http://www.ixion.es

 

 


References:
How access to an array value from a process variable using ca_array_get()? Raquel Pérez Lázaro
Re: How access to an array value from a process variable using ca_array_get()? J. Lewis Muir

Navigate by Date:
Prev: EDM install on fedora20-64 bit system problem: "lib605432d2-f29d-11d2-973b-00104b8742df.so: cannot open shared object file: No such file or directory" lzf neu
Next: CA.Client.Exception "Virtual circuit disconnect" source file: .../cac.pp line 1215 Raquel Pérez Lázaro
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
Navigate by Thread:
Prev: Re: How access to an array value from a process variable using ca_array_get()? J. Lewis Muir
Next: IOC Connecting Problem Pilkyu Jung
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
ANJ, 17 Feb 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·