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

Subject: RE: Portable Channel Access Server Event Queue
From: "Hu, Yong" <yhu@bnl.gov>
To: "Christopher J. Pendleton" <cpendleton@ptcusa.com>, "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Thu, 22 May 2014 13:14:22 +0000
Hello Chris,

A few questions and suggestions for you:

1. You said that postEvent() is called repeatedly at a very high rate. Is the rate at range of 10 Hz, 100 Hz or 1 KHz? I tested with PCAS example (makeBaseApp -t caServer ...) and found that I could not camonitor "jane" (a single double value) if I change its scan period from1.0e-1 to 5.0e-3 (200 Hz).   

2. Regarding the queue size, I found "Server Subscription Update Queuing" at http://www.aps.anl.gov/epics/base/R3-14/12-docs/CAref.html. Now,  we have questions for Jeff H. and others who know PCAS internal implementation: are the queue sizes for CA servers (PCAS, RSRV) and CA client configurable and how to configure them if they are? Does postEvent() use callbackQueueSize which is 2000 by default? Maybe, Chris's case is not related to the queue size at all.

3. You may use caServer::subscriptionEventsPosted() and caServer::subscriptionEventsProcessed() in your portable CA server. These two numbers should be same if the whole system, including the portable CA server and the CA client, is working properly. 

4. You may re-think how you handle your data. Instead of sending the sample(s) to the portable CA server and then postEvent() at a very high rate, you may queue / accumulate the sample(s), i.e. pack the data as an array (or a bigger array if the data source is already an array). Then, postEvent() that big data set at a lower rate.

5. If #4 is really not what you like to do, you may write a regular EPICS driver (record support-->device support (or asyn-based) --> driver) for your device, which is a natural way for EPICS-based low-level device control. The regular EPICS driver could give you up to KHz update rate if you really want your system to be so fast. 

Good luck!

Yong

________________________________________
From: tech-talk-bounces@aps.anl.gov [tech-talk-bounces@aps.anl.gov] on behalf of Christopher J. Pendleton [cpendleton@ptcusa.com]
Sent: Monday, May 19, 2014 11:56 AM
To: tech-talk@aps.anl.gov
Subject: RE: Portable Channel Access Server Event Queue

I was hoping someone could help me with this? Thanks!

-----Original Message-----
From: Christopher J. Pendleton [mailto:cpendleton@ptcusa.com]
Sent: Friday, May 09, 2014 12:11 PM
To: 'tech-talk@aps.anl.gov'
Subject: Portable Channel Access Server Event Queue

Hello! I am using the portable channel access server API to provide EPICS
access to our devices. Some of our devices perform data acquisition at high
rates and send a buffer up to the server, which then calls the casPV class
method postEvent() repeatedly at a very high rate. When I run a client that
monitors this PV, I often see that some of the data samples are missing. I
suspect that this is a function of the queue size that postEvent()
populates, the rate at which it is populated, and the rate at which it is
offloaded by the client(s). Could someone please help me understand why the
client(s) would not receive the full set of data samples posted to the event
queue?

Regards,
Chris

Christopher J. Pendleton
Director, Software Development
Pyramid Technical Consultants, Inc.
http://ptcusa.com/

Replies:
RE: Portable Channel Access Server Event Queue Christopher J. Pendleton
References:
RE: Portable Channel Access Server Event Queue Christopher J. Pendleton

Navigate by Date:
Prev: Re: procServ and user id Ralph Lange
Next: RE: Portable Channel Access Server Event Queue Christopher J. Pendleton
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
Navigate by Thread:
Prev: RE: Portable Channel Access Server Event Queue Christopher J. Pendleton
Next: RE: Portable Channel Access Server Event Queue Christopher J. Pendleton
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·