EPICS Controls 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  2019  2020  2021  2022  <20232024  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  2019  2020  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: Can we set 'NELM' tobe a variable in waveform or subArray?
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: Kevin <279762081 at qq.com>
Cc: tech-talk <tech-talk at aps.anl.gov>
Date: Sun, 20 Aug 2023 20:28:47 +0000
For the waveform record NELM is the maximum number of elements and cannot be changed a run time. However, NORD is the actual number of elements currently in the array, and it can be changed at run time. 

Please explain what you are trying to do. I suspect that you should be able to use NORD.

Mark


Sent from my iPhone

On Aug 20, 2023, at 3:21 PM, Kevin via Tech-talk <tech-talk at aps.anl.gov> wrote:


Hello everyone,
    
I used waveform to read  8 channels data, the waveform record is:

record(waveform, "$(P)Countxxyy")

{

  field(DTYP, "stream")

  field(INP, "@ct0801f.proto Counters_in  $(PORT)")

  field(NELM, "8")

  field(FTVL, "LONG")

  field(SCAN, "$(SCAN)")

}

The user hope that the NELM is a variable,  so I used $(P)N  to controller the readout numbers:

record(waveform, "$(P)Counters")

{

  field(DTYP, "stream")

  field(INP, "@ct0801f.proto Counters_in  $(PORT)")

  field(NELM, "$(P)N")

  field(FTVL, "LONG")

  field(SCAN, "$(SCAN)")

}

 When $(P)N changed, the $(P)Countxxyy keep an initial value. I think that the NELM can not be modified:

<2A371D12 at F3664E2C.578BE164.png.jpg>

Then I found the modify property about NELM in subArray is ‘yes’,

<058F0953 at EEFA6B62.578BE164.png.jpg>


So I changed the record like this:

record(waveform, "$(P)Counters")

{

  field(DTYP, "stream")

  field(INP, "@ct0801f.proto Counters_in  $(PORT)")

  field(NELM, "8")

  field(FTVL, "LONG")

  field(SCAN, "$(SCAN)")

}

record(subArray,"$(P)Countersxy") {

  field (DESC, "Read counterx~countery")

  field (INP, "$(P)Counters")

  field (MALM, "8")

  field (NELM, "$(P)N")

  field (INDX, "0")

  field (SCAN, "$(SCAN)")

}

When the $(P)N changed tobe 4, $(P)Countersxy.NELM doesn't change. It is still the inital value 1, and $(P)Countersxy read only 1 channel data.

Can we set the NELM tobe a variable?

How could we read changing channels from the above 8 channel datas?

I am confused and ask for help. Thank you so much.

With my best reguards,

Kevin

JPEG image

JPEG image


References:
Can we set 'NELM' tobe a variable in waveform or subArray? =?gb18030?b?S2V2aW4=?= via Tech-talk

Navigate by Date:
Prev: Can we set 'NELM' tobe a variable in waveform or subArray? =?gb18030?b?S2V2aW4=?= via Tech-talk
Next: Re: Dante Andrew Johnson 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  2019  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: Can we set 'NELM' tobe a variable in waveform or subArray? =?gb18030?b?S2V2aW4=?= via Tech-talk
Next: Trouble with pva:// on Phoebus with often-restarted IOCs Leblanc, Gregory 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  2019  2020  2021  2022  <20232024 
ANJ, 21 Aug 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·