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  2018  <20192020  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  2018  <20192020 
<== Date ==> <== Thread ==>

Subject: Re: generalTime/epicsTimeGetCurrent and casr questions
From: Hugo Slepicka via Tech-talk <tech-talk@aps.anl.gov>
To: Mark Rivers <rivers@cars.uchicago.edu>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>, "Brands Helge \(PSI\)" <helge.brands@psi.ch>
Date: Wed, 13 Mar 2019 08:23:19 -0700
Hi Mark,

With PyDM we open one connection and this connection is reused by all widgets that need a certain PV. When we no longer have widgets that need that certain PV, the connection is closed.

Cheers,
Hugo

On Wed, Mar 13, 2019 at 5:34 AM Mark Rivers via Tech-talk <tech-talk@aps.anl.gov> wrote:
Hi Helge,


Thanks for the reply.  I am not sure why the task of buffering should be pushed to the user.


caQtDM is described as a replacement for medm.  But when I look at the medm code it does not create a new CA connection every time a slider is moved.


This is the code when a slider is moved:


void valuatorValueChanged(Widget w, XtPointer clientData,
  XtPointer callbackStruct)
{
...
        if(pr->writeAccess) {
            medmSendDouble(pv->record,value);
          /* Move/redraw valuator & value, but force use of
             user-selected value */
            valuatorSetValue(pv,value,True);


So it calls medmSendDouble() for each slider move.  This is the code for medmSendDouble()

void medmSendDouble(Record *pr, double data)
{
    int status;

    Channel *pCh = &((caTask.pages[pr->caId/CA_PAGE_SIZE])
      [pr->caId % CA_PAGE_SIZE]);
    status = ca_put(DBR_DOUBLE,pCh->chid,&data);
#if DEBUG_SLIDER
    if(data > 150.0 || data < -150.0) {
        print("medmSendDouble: %g\n",data);
    }
#endif
    if(status != ECA_NORMAL) {
        medmPostMsg(1,"medmSendDouble: ca_put failed: %s\n",
          ca_message(status));
    }
    ca_flush_io();
}

Note that medmSendDouble does not create a new channel each time it is called.  It uses a chid that was previously created.  It seems to me that this is the preferred design for GUI programs.  caQtDM is doing the equivalent of the ca_put command line utility, creating and destroying a channel on each put operation, which is much less efficient.

Can anyone answer how edm, CSS, and PyDM handle this?

Mark





________________________________
From: Brands Helge (PSI) <helge.brands@psi.ch>
Sent: Wednesday, March 13, 2019 3:16 AM
To: Mark Rivers
Cc: 'tech-talk@aps.anl.gov'
Subject: AW: generalTime/epicsTimeGetCurrent and casr questions


Hi Mark,



yes, you are completely right! I can give you much more examples then a slider, where this is for a small IOC a nightmare.

But what should be the best case. For a Message-Button this is enough and for other widgets too. The Plugin is only a link between the EPICS library, that could  buffer such connections. You as a designer of a panel can do the same job with some Softchannels!



caQtDM gives you only the possibility to do something, we are not responsible what users do.



The problem in this is the housekeeping of channels together with the optimization of monitoring with the visibility and multiple windows.

But even then the optimization will not help against of the huge amount of SETS of an EPICS channel during a movement of a slider!



Best regards

                Helge
--
Hugo Slepicka
+1 631 855 5717

References:
generalTime/epicsTimeGetCurrent and casr questions Layne (US), William C via Tech-talk
Re: generalTime/epicsTimeGetCurrent and casr questions Mark Rivers via Tech-talk
Re: generalTime/epicsTimeGetCurrent and casr questions Johnson, Andrew N. via Tech-talk
RE: generalTime/epicsTimeGetCurrent and casr questions Mark Rivers via Tech-talk
RE: generalTime/epicsTimeGetCurrent and casr questions Mark Rivers via Tech-talk
AW: generalTime/epicsTimeGetCurrent and casr questions Brands Helge (PSI) via Tech-talk
RE: generalTime/epicsTimeGetCurrent and casr questions Mark Rivers via Tech-talk
AW: generalTime/epicsTimeGetCurrent and casr questions Brands Helge (PSI) via Tech-talk
Re: generalTime/epicsTimeGetCurrent and casr questions Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: generalTime/epicsTimeGetCurrent and casr questions Jemian, Pete R. via Tech-talk
Next: Re: I'm looking for a pvacces example to read PVStructure Heinz Junkes via Tech-talk
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  2018  <20192020 
Navigate by Thread:
Prev: Re: generalTime/epicsTimeGetCurrent and casr questions Jemian, Pete R. via Tech-talk
Next: RE: generalTime/epicsTimeGetCurrent and casr questions Mark Rivers via Tech-talk
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  2018  <20192020 
ANJ, 13 Mar 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·