EPICS Home

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  2021  2022  2023  2024  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  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: pvGet in Sequence does not work with incorrect size
From: Jure Varlec via Tech-talk <[email protected]>
To: [email protected]
Date: Mon, 16 Sep 2019 14:54:57 +0200
Hello,

We hit an issue that is very similar. Here's what we do (testing with
EPICS base 3.15.6 and seq-2-2-5 from synApps):

 - a string array of length 25 is given an anonymous assignment;
 - the array is later dynamically assigned to a string waveform of
   NELM 20;
 - after it is connected (pvStatus returns 0), pvGet is called to
   fetch the value.
 
Here's what happens:

  - If the waveform is not monitored, pvGet returns success, but the
    array is empty.
  - If the array is monitored from the start (i.e. when assigned to
    anonymous PV), everything seems to work, but
  - if pvMonitor is called shortly before pvGet, it works only
    sometimes, indicating that pvGet still doesn't work, it's merely a
    race whether a monitor arrives soon enough.
  - If the waveform is not monitored, but waveform's NELM is 25
    (matching the array size) and NORD is 20, pvGet works.
  - EPICS_CA_MAX_ARRAY_BYTES has no effect.

For our case, monitoring is a passable workaround since we are
reasonably certain that the first monitor will arrive before the value
is needed. But there are cases when one needs to use pvGet to get the
current value, and NELM is not exactly known at build-time to allocate
the array.

Best
Jure

On Wed, 04. September 2019 15:05:55 CEST Simon Reiter via Tech-talk wrote:
> Ok,
> 
> This problem solve itself.
> 
> PVs were provided by a gateway with EPICS_CA_MAX_ARRAY_BYTES slightly
> too low in the same network. Depending on which PVs was connected in
> the sequence, it either worked or not.
> 
> Maybe this helps someelse in the future ;)
> 
> Cheers,
> Simon
> 
> On Mon, 2019-09-02 at 16:06 +0200, Simon Reiter via Tech-talk wrote:
> > Hi Ben,
> > 
> > Since monitoring work back then, I could live with that.
> > 
> > But I am facing a new/similar problem right now. There seems to be a
> > problem also for monitored PVs. This time the array size is 262144.
> > 
> > Earlier pvGet() always resulted in a timeout. But now this happens
> > only
> > for some modules. The sequence is running in parallel for 5 modules
> > right now. 2 of them are fine, 2 not. Sometime it changes after minor
> > (logging) changes in the code. So I already assumed some memory
> > problem, but I am not sure how to handle.
> > 
> > So I have to scenarios:
> > - pvGet run into timeout
> > - all entries of monitored PV are zero
> > 
> > What are the reasons, a pvGet runs into a timeout at all? I check in
> > the previous condition that the PV is connected.
> > 
> > Cheers,
> > Simon
> > 
> > PS: Currently running with EPICS 3.16.
> > 
> > On Wed, 2019-07-17 at 12:42 +0200, Benjamin Franksen wrote:
> > > Am 16.07.19 um 16:43 schrieb Simon Reiter via Tech-talk:
> > > > using the sequencer in v2.2 and EPICS 3.14:
> > > > 
> > > > The sequence does get a waveform, does a calculation and pushes
> > > > an
> > > > array out to another waveform PV.
> > > > 
> > > > pvGet() is not working and runs in a timeout in case the size of
> > > > the
> > > > unsigned char array does not exactly fit the size of the
> > > > waveform.
> > > > 
> > > > Instead, assigning and monitoring the PV in the beginning works
> > > > fine.
> > > > Is this on purpose? The monitoring of the is not necessary.
> > > 
> > > Hi Simon
> > > 
> > > This should not happen. I will try to reproduce your problem and
> > > add
> > > a
> > > test case. Dealing with arrays in EPICS is awfully hard, so I guess
> > > it's
> > > quite possible that this is a bug in the Sequencer.
> > > 
> > > Cheers
> > > Ben





References:
pvGet in Sequence does not work with incorrect size Simon Reiter via Tech-talk
Re: pvGet in Sequence does not work with incorrect size Simon Reiter via Tech-talk
Re: pvGet in Sequence does not work with incorrect size Simon Reiter via Tech-talk

Navigate by Date:
Prev: Re: Sumo test Jörn Dreyer via Tech-talk
Next: Re: pvGet in Sequence does not work with incorrect size Dejan Kocjan 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  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: pvGet in Sequence does not work with incorrect size Benjamin Franksen via Tech-talk
Next: Re: pvGet in Sequence does not work with incorrect size Dejan Kocjan 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  2021  2022  2023  2024