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  2008  2009  <20102011  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  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: gateway won't set "busy" PV type properly
From: Andrew Johnson <[email protected]>
To: [email protected]
Cc: Dennis Nicklaus <[email protected]>, Denise Finstrom <[email protected]>, Congcong Tan <[email protected]>
Date: Thu, 22 Apr 2010 14:08:12 -0500
Hi Dennis,

On Thursday 22 April 2010 11:40:11 Dennis Nicklaus wrote:
> We've encountered an odd behavior the last couple days that has us
> pretty confused.
> Can someone please explain this and/or suggest a fix?
> When I set a certain PV going through an EPICS gateway, the setting
> doesn't "work*" entirely.
> If set through a non-gateway-ed connection, everything works fine.

One significant difference between doing a caput directly and via the CA 
gateway is that the gateway converts your ca_put() into a ca_put_callback() to 
the IOC.  You can ask caput to do the same thing directly by giving it a -c 
option.

Why haven't you noticed this before now?  Because for most records the 
ca_put_callback() will complete almost immediately and you won't notice the 
difference.  However the busy record type is deliberately designed to not 
report completion until all of the underlying operations kicked off by your 
put have completed, and in your case that probably means until the camera's 
exposure has completed, which I'm guessing is taking longer than the default 1 
second time-out that caput() waits for the CA operation to complete.  You can 
increase that time-out using the -w option.

One more thing to say about the gateway: while a channel has a put_callback() 
operation outstanding (i.e. until the busy record goes back to state Done) you 
won't be able to write to that channel through the gateway at all.

I think the combination of these should explain the funny behaviors that 
you're seeing, which I believe are interactions between deliberate design 
choices.

One other question you might ask is why the gateway converts your ca_put() 
into a ca_put_callback()?  That's because the CAS library that implements the 
CA server doesn't tell the gateway code whether your caput request asked to do 
a ca_put() or ca_put_callback() operation (although internally the CAS does 
know that), so the gateway has to use the more conservative operation.

- Andrew
-- 
The best FOSS code is written to be read by other humans -- Harald Welte


References:
gateway won't set "busy" PV type properly Dennis Nicklaus

Navigate by Date:
Prev: Re: Striptool crashes for Fedora 11 64 bit version... Janet Anderson
Next: Re: EDM's -ro option and running arbitrary scripts w/ in our case caputs John William Sinclair
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: gateway won't set "busy" PV type properly Dennis Nicklaus
Next: RE: gateway won't set "busy" PV type properly Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  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 ·