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: Waveform record not sending monitor on .NORD field
From: Lucas Russo via Tech-talk <tech-talk@aps.anl.gov>
To: Michael Davidsaver <mdavidsaver@gmail.com>
Cc: EPICS Tech Talk <tech-talk@aps.anl.gov>
Date: Fri, 8 Nov 2019 19:44:55 -0300
Hi Michael,

I see. I'm gonna try to isolate my issue and see if I can reproduce it. Maybe it's something silly.

Thanks again,

Cheers!

Lucas

On Thu, Nov 7, 2019, 12:40 Michael Davidsaver <mdavidsaver@gmail.com> wrote:
Considering

> record(waveform, "rec1") {
>     field(INP, [1, 2, 3])
>     field(NELM, "10")
> }
>
> record(waveform, "rec2") {
>     field(INP, "rec1")
>     field(NELM, "10")
> }


Running in softIoc w/ 7.0.3.1

> $ camonitor -# 0 rec1 rec1.NORD rec2 rec2.NORD
> rec1 <undefined> 3 1 2 3 UDF INVALID
> rec1.NORD                      <undefined> 3 UDF INVALID
> rec2                           <undefined> UDF INVALID
> rec2.NORD                      <undefined> 0 UDF INVALID
> # concurrently run "caput rec2.PROC 1"
> rec2.NORD                      <undefined> 3 UDF INVALID
> rec2.NORD                      <undefined> 3 UDF INVALID
> rec2 2019-11-07 07:25:44.567487 3 1 2 3
> # concurrently run "caput rec2.PROC 1" again
> rec2 2019-11-07 07:26:40.847710 3 1 2 3



> devwaveformStream.c does not show any db_post_events () call. Could this be the issue?

No.  The fact that devWfSoft.c still does is the bug which gives the
double update.   Device support for waveformRecord should only update
the NORD field, which devwaveformStream.c appears to do.


On 11/7/19 5:36 AM, Lucas Russo wrote:
> Hi Michael,
>
> Thanks for your answer!
>
> I'm using EPICS base 3.15.6 in this case + stream device 2.8.8 + asyn R4-35.
> I'm controlling the number of points of my waveform by writing into another record that changes the number
> of points in my instrument.
>
> I'm using this record for the waveform:
>
> record(waveform, "$(P)$(R)Trace-Mon") {
>   field(DESC, "Get trace waveform")
>   field(SCAN, ".002 second")
>   field(SDIS, "$(P)$(R)GetSpectrum-Sel.RVAL")
>   field(DISV, "0")
>   field(MPST, "On Change")
>   field(APST, "On Change")
>   field(PRIO, "HIGH")
>   field(NELM, "32001")
>   field(FTVL, "FLOAT")
>   field(DTYP, "stream")
>   field(INP, "@rsfsx.proto monTrace $(PORT)")
>   field(FLNK, "$(P)$(R)TraceLen-Mon")
> }
>
> And the stream device protocol:
>
> monTrace {
>     out "TRAC? TRACE1";
>     in "%f";
> }
>
> In one terminal I was monitoring the NORD field of my waveform:
>
> lerwys@localhost:~$ camonitor -# 1 SI-Glob:DI-TuneProc-H:Trace-Mon.NORD
> SI-Glob:DI-TuneProc-H:Trace-Mon.NORD 2019-11-07 10:18:27.332989 1 550
>
> On another terminal I changed the number of points of that waveform:
>
> lerwys@localhost:~$ caput SI-Glob:DI-TuneProc-H:SwePts-SP 600
> Old : SI-Glob:DI-TuneProc-H:SwePts-SP 550
> New : SI-Glob:DI-TuneProc-H:SwePts-SP 600
>
> The monitor does not change when I change the number of points, but when I do the camonitor command again it shows the correct value for NORD:
>
> lerwys@localhost:~$ camonitor -# 1 SI-Glob:DI-TuneProc-H:Trace-Mon.NORD
> SI-Glob:DI-TuneProc-H:Trace-Mon.NORD 2019-11-07 10:18:27.332989 1 550  
> ^C
> lerwys@localhost:~$ camonitor -# 1 SI-Glob:DI-TuneProc-H:Trace-Mon.NORD
> SI-Glob:DI-TuneProc-H:Trace-Mon.NORD 2019-11-07 10:22:07.733633 1 600
>
> One of my colleagues mentioned that maybe StreamDevice is not posting monitors on NORD. Doing a quick
> look at https://github.com/paulscherrerinstitute/StreamDevice/blob/2.8.8/src/devwaveformStream.c does not
> show any db_post_events () call. Could this be the issue?
>
> Thanks!
>
> Lucas
>
> On Wed, Nov 6, 2019 at 2:19 PM Michael Davidsaver <mdavidsaver@gmail.com <mailto:mdavidsaver@gmail.com>> wrote:
>
>     On 11/6/19 4:48 AM, Lucas Russo via Tech-talk wrote:
>     > Hi again,
>     >
>     > As a workaround to the problem I FLNK'ed the "waveform" record to an "ai" record that fetches its .NORD value. The "ai" send the monitors correctly and I can monitor them from the other IOC.
>
>     This was a common workaround with Base 3.14.x, which shouldn't be necessary with later versions.
>     Between this, and better handling by CA of array size changes, I find it unnecessary these days.
>
>     waveformRecord was fixed in 3.15.0.1 by [1] and for other record types in Base
>     by [2] in 3.15.6 (also changes waveformRecord slightly to post a monitor only
>     when NORD changes).
>
>     [1] https://github.com/epics-base/epics-base/commit/037e5f6a9def88cc5e1422788999fe3299c24c31
>
>     [2] https://bugs.launchpad.net/epics-base/+bug/1730727
>         https://github.com/epics-base/epics-base/commit/ec351c5e2f995770b3fc6788b63cf76990fbb2f3
>
>
>     > Cheers!
>     >
>     > Lucas
>     >
>     >
>     >
>     > On Thu, Oct 31, 2019 at 7:51 AM Lucas Russo <lerwys@gmail.com <mailto:lerwys@gmail.com> <mailto:lerwys@gmail.com <mailto:lerwys@gmail.com>>> wrote:
>     >
>     >     Hello everyone,
>     >
>     >     I've been trying to use the .NORD field value to trigger a change in a subArray record. I'm doing it like this: https://github.com/lnls-dig/tune-epics-ioc/blob/master/tuneApp/Db/tune.db#L519
>     >
>     >     And the waveform I'm monitoring from is this one: https://github.com/lnls-dig/rsfsx-epics-ioc/blob/master/rsfsxApp/Db/rsfsx.db#L1670
>     >
>     >     I can see that the Trace-Mon record is correctly sending monitors on the .VAL field. Also, the value of .NORD changes correctly as well, but it's just not sending any monitors (tested with camonitor).
>     >
>     >     I'm using epics base 3.15.5. From the release notes it seems this has been fixed in 3.15.0.1.
>     >
>     >     Am I missing something here?
>     >
>     >     Thanks a lot!
>     >
>     >     Lucas
>     >
>     >
>


References:
Waveform record not sending monitor on .NORD field Lucas Russo via Tech-talk
Re: Waveform record not sending monitor on .NORD field Lucas Russo via Tech-talk
Re: Waveform record not sending monitor on .NORD field Michael Davidsaver via Tech-talk
Re: Waveform record not sending monitor on .NORD field Lucas Russo via Tech-talk
Re: Waveform record not sending monitor on .NORD field Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: RE: ADAndor iKon CCD low saturation point Mark Rivers via Tech-talk
Next: Re: Xilinx ARM64 mmap and regdev module compile error Jeong Han Lee 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: Waveform record not sending monitor on .NORD field Michael Davidsaver via Tech-talk
Next: EPICS Base-3.15.7 and EPICS 7.0.3.1 Released Johnson, Andrew N. 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, 08 Nov 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·