EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  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  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: subroutine, chaning links
From: Ben Franksen <[email protected]>
To: [email protected]
Date: Fri, 30 May 2008 18:27:09 +0200
On Freitag, 30. Mai 2008, Mathias Steiner wrote:
> All would be well if it were possible to change links -- either .FLNK or
> .OUT -- from within a subroutine.  I've tried a couple of things without
> success.  Just pasting the channel name into the "value" field of the
> union does not, and probably should not, work.
>
> Assigning a different value to a link by copying an input link doesn't
> work either:
> psub->flnk = psub->inpb;
>
> This isn't so clear to me, since they are both of type DBLINK.  After
> all, I can "just" type the value into the .FLNK field of any channel
> using edm, and it'll work...

It works because this operation is going via Channel Access.

You can do the same from your subroutine: use the CA client library to 
establish a channel to the FLNK (or whatever other link) field, then do a 
ca_put with the new value. A very simple example for how to use CA (client) 
is provides as a makeBaseApp template, just do

  makeBaseApp.pl -t caClient

and look at caExample.c.

I am not sure whether the ca_context_create() call is necessary if you call 
CA from a subroutine record, maybe the context has already been 
initialized?

Cheers
Ben

Replies:
Re: subroutine, chaning links Tim Mooney
References:
subroutine, chaning links Mathias Steiner

Navigate by Date:
Prev: subroutine, chaning links Mathias Steiner
Next: Re: subroutine, chaning links Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: subroutine, chaning links Mathias Steiner
Next: Re: subroutine, chaning links Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·