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  2010  2011  2012  <20132014  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  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: caClient with PCAS
From: [email protected]
To: [email protected]
Date: Fri, 22 Feb 2013 11:00:17 -0800 (PST)
Hi,

I am trying to add a portable channel access server to a channel access
client, similar to the EPICS gateway I believe. The values for the process
variables that are created by the PCAS are written to from the connection
and event handler callbacks for the caClient. The problem I think I am
running into, is that when I call fileDescriptorManager.process, these
callbacks get called similar to as if a ca_pend_event was called. So after
the call to fileDescriptorManager.process and before it completes, new
values are being written to the PCAS process variables, and postEvent is
being called for these changed values. This leads to funny behavior where
the same value is posted for a PCAS channel multiple times in a row (as
seen with camonitor). For example, it should post 1, 2, 3 but posts 3, 3,
3 instead, all with the same time stamps. Is there a way around this?

I also ran a test, with just the PCAS and leaving out the caClient. I
wrote to a PCAS process variable continuously with increasing values in
one thread and called fileDescriptorManager.process continuously in
another thread. This gave me similar results, that is the same value was
posted multiple times in a row for stretches of time before it increased.
I was not surprised that I got funny behavior doing this, but the fact
that it was similar to the caClient helped me diagnose what may be
happening.

Also, what is the usual way to update the values for the PCAS process
variables from the application itself (i.e. not with a caput)? I added a
public function to the PCAS Server that calls functions in the appropriate
PV instance to write a value and call the postEvent function. Is this
typical? If so, I am guessing that I should also check in this function to
see if the new value will actually be different before writing it, so that
postEvent is not called when the value has not really changed? Or is there
another way to do that?

Thank you for your time,
Patrick



Replies:
Re: caClient with PCAS Xiaoqiang Wang

Navigate by Date:
Prev: Re: asyn and snmp Pete Jemian
Next: CA beacon question Pierrick Hanlet
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Problem when cross-compiling epics base for vxWorks5.5 on win32-x86 J. Lewis Muir
Next: Re: caClient with PCAS Xiaoqiang Wang
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·