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:Compress Record with input from partial Waveform
From: GAGET Alexis via Tech-talk <[email protected]>
To: Bruno Martins <[email protected]>, tech-talk <[email protected]>
Date: Mon, 22 Jul 2019 17:14:55 +0000
Hi Bruno
I would have tried to play on the Input instead, trying to replace the waveform by a subArray or adding it between the compress and the waveform. The subArray NELM can be modified online so you can maybe defined it with the "fix amount per run" (if you know it)

Something like that :
record(waveform, "WVF") {
    field(FTVL, "DOUBLE")
    field(NELM, "50")
}
record (calcout, "plouf"){
    field(INPA, "MyFixAmout CPP")
    field(VAL, "A")
    field(OUT, "SubA.NELM PP")   
}

record(subArray, "SubA") {
    field(INP, "WVF CPP")
    field(FTVL, "DOUBLE")
    field(NELM, "5")
    field(MALM, "100")
}

record(compress, "CMP") {
    field(ALG,  "Circular Buffer")
    field(INP,  "SubA CP")
    field(NSAM, "100")
}

Not sure that's work, it's by memory, so consider it as a lead

Cheers
Alexis


De : [email protected] [[email protected]] de la part de Bruno Martins via Tech-talk [[email protected]]
Envoyé : vendredi 19 juillet 2019 23:43
À : tech-talk
Objet : Compress Record with input from partial Waveform

Hi folks,

Is there a way to force compress to take only NORD elements from its INP waveform? I have a big waveform that only has some of its data initialized (a fixed amount per "run"), and I want to accumulate this initialized data in a circular buffer. Has anyone made something similar work? Do I need to interpose an acalcout between the two (which I tried but didn't seem to work)?

Please see example below.

Thanks!

Bruno

$ cat test.db
record(waveform, "WVF") {
    field(FTVL, "DOUBLE")
    field(NELM, "50")
}

record(compress, "CMP") {
    field(ALG,  "Circular Buffer")
    field(INP,  "WVF CP")
    field(NSAM, "100")
}

$ softIoc -d test.db
...

$ caget CMP.NUSE  # returns 50, I expected 0 (no PINI set)...
CMP.NUSE                       50

$ caput CMP.RES 1  # let's reset compress
Old : CMP.RES                        0
New : CMP.RES                        0

$ caget CMP.NUSE
CMP.NUSE                       0

$ caput -a WVF 5 1 2 3 4 5
Old : WVF 50 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
New : WVF 50 1 2 3 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

$ caget WVF.NORD
WVF.NORD                       5

$ caget CMP.NUSE   # I expected 5
CMP.NUSE                       50

$ caget CMP
CMP 100 1 2 3 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

$ caput -a WVF 5 6 7 8 9 10
Old : WVF 50 1 2 3 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
New : WVF 50 6 7 8 9 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

$ caget WVF.NORD
WVF.NORD                       5

$ caget CMP.NUSE  # I expected 10
CMP.NUSE                       100

$ caget CMP # I expected 1,2,3,4,5,6,7,8,9.10
CMP 100 1 2 3 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 7 8 9 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

References:
Compress Record with input from partial Waveform Bruno Martins via Tech-talk

Navigate by Date:
Prev: Compress Record with input from partial Waveform Bruno Martins via Tech-talk
Next: Re: Channel Access and channel name weirdness Michael Westfall 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: Compress Record with input from partial Waveform Bruno Martins via Tech-talk
Next: Start OPIs from command line interface Tong Zhang 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