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  <20212022  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  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Questions about arrays
From: "Hu, Yong via Tech-talk" <tech-talk at aps.anl.gov>
To: "Mooney, Tim M." <mooney at anl.gov>, EPICS tech-talk <tech-talk at aps.anl.gov>, "Wang, Andrew" <wang126 at llnl.gov>
Date: Thu, 1 Apr 2021 15:37:29 +0000

To me, this is an excellent solution provided that the external “calc” module is successfully built.

https://github.com/epics-modules/calc

 

I frequently use “acalcout” for array operation (without writing any codes). It is really a useful and powerful record type. Could it be nice to include acalcout / scalcout in future EPICS Base release so that we can use them right out of box? It seems core developers are reluctant to include new record types to the Base: only a handful of new record types (int64in, int64out, lsi, lso) have been added to the Base in the past few decades.  

 

Cheers,

Yong

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Reply-To: "Mooney, Tim M." <mooney at anl.gov>
Date: Tuesday, March 30, 2021 at 11:31 AM
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "Wang, Andrew" <wang126 at llnl.gov>
Subject: Re: Questions about arrays

 

Hi Andrew,

 

It's clunky and inefficient, but problem (1) can be solved with an acalcout record.  If AA=[0,1,2,3,4,5], and A=20, then the _expression_ "cat(cat(aa[0,2],a),aa[3,5])" yields AVAL=[0,1,2,20,4,5]

 

Even more horrifying, problem (2) can also be solved with an acalcout record.  If A==1, B==2, etc., up to H==8, then the _expression_ "aa:=a;k:=0;j:=until(aa:=cat(aa[0,k],@(k+1));k:=k+1;k==9);aa" yields AVAL=[1,2,3,4,5,6,7,8,0,...].

 

I'm sure there are better solutions, but sometimes it's ok to do something clunky for the moment, so you can move on to the next part of the problem.

 

Tim Mooney (mooney at anl.gov) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Wang, Andrew via Tech-talk <tech-talk at aps.anl.gov>
Sent: Monday, March 29, 2021 10:55 PM
To: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Questions about arrays

 

All,

 

I have two questions pertaining to the array records in EPICS 3.15. 

 

  1. Suppose I have an analog input array or waveform record of size 5 that contains the values 1, 2, 3, 4, 5. Suppose I want to replace with the fourth element. Based upon what I've read, it doesn't seem like subArray is a viable choice. I've also tried to use caput but to no avail. Any recommendations other than using aSub?
  2. Suppose I have eight individual analog input records and I want to "concatenate their values" and store the result into an analog input array record. I'm thinking about using either aCalcout or an aub routine. Are those valid options and if not, what are alternative options I should explore?

 

Thank you!

 

Andy


Replies:
Re: Questions about arrays Ralph Lange via Tech-talk
References:
Questions about arrays Wang, Andrew via Tech-talk
Re: Questions about arrays Mooney, Tim M. via Tech-talk

Navigate by Date:
Prev: Re: epics support for powerpc64-linux Johnson, Andrew N. via Tech-talk
Next: device support for Inficon SQM-160 or STM-2XM Laurenz Rettig 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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: Questions about arrays Mooney, Tim M. via Tech-talk
Next: Re: Questions about arrays Ralph Lange 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  <20212022  2023  2024 
ANJ, 01 Apr 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·