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: combining long strings
From: "Lang, Keenan C. via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "Sintschuk, Michael" <michael.sintschuk at bam.de>
Date: Tue, 2 Feb 2021 03:40:01 +0000
Hello Michael,

I believe that you could theoretically solve this with separate waveform records for each of the input values, then use an acalcout record to concatenate the arrays together.

Otherwise, I would also like to put forward the luascript record (https://github.com/epics-modules/lua). It works very similarly to the calc style records just with a full programming language behind it. I had to put in a commit because I wasn't previously pulling in enum data, but if you grab the master branch you could do this:


record(luascript,"$(exp):FilePath") {

  field(INAA,"$(exp):PathMenu.VAL CP")

  field(INBB,"$(exp):DateMenu.VAL CP")

  field(INCC,"$(exp):SampleMenu.VAL CP")

  field(INDD,"$(exp):OrientationMenu.VAL CP")

  field(INEE,"$(exp):EnergyMenu.VAL CP")

  field(INFF,"$(cam):$(format)1:FileNumber CP")

  field(CODE,"return table.pack(string.byte(AA..BB..CC..DD..EE..FF, 1, -1))")

  field(OUT,"$(cam):$(format)1:FilePath PP")

}


The CODE field there concatenates the strings, turns the resulting string into a set of bytes, then puts those bytes together into an array which the record can write out to a waveform.



Keenan

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Sintschuk, Michael via Tech-talk <tech-talk at aps.anl.gov>
Sent: Monday, February 1, 2021 4:42 AM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: combining long strings
 

Hello EPICS-community,

 

I’m trying to find a solution for the following calculation:

 

record(scalcout,"$(exp):FilePath") {

  field(INAA,"$(exp):PathMenu.VAL CP")

  field(INBB,"$(exp):DateMenu.VAL CP")

  field(INCC,"$(exp):SampleMenu.VAL CP")

  field(INDD,"$(exp):OrientationMenu.VAL CP")

  field(INEE,"$(exp):EnergyMenu.VAL CP")

  field(INFF,"$(cam):$(format)1:FileNumber CP")

  field(CALC,"AA+BB+CC+DD+EE+FF")

  field(OUT,"$(cam):$(format)1:FilePath")

}

 

INAA to INFF are mbbo records that I want to use as dropdown-menus. Each time a dropdown-menu is changed by the user, the scalcout record recalculates the FilePath and puts the new path-string to the areaDetector FilePath record, which is a waveform. This would work fine, if there wasn’t the 40 character limitation for the scalcout-record, so the OUT field is cut. Each of the input fields is smaller then 40 character but combined (the actual path-string) is longer. Can anyone give me an example how to solve this, if possible? I searched the tech-talk but with no luck…

 

Regards

Michael  

 

Michael Sintschuk
Bundesanstalt für Materialforschung und –prüfung (BAM)
8.5 Mikro-ZfP

Unter den Eichen 87
12205 Berlin
GERMANY

P: +49 30 8104-5736 (BESSY, Adlershof)

P: +49 30 8104-4065 (BAM, Steglitz)
michael.sintschuk at bam.de

 


Replies:
AW: combining long strings Sintschuk, Michael via Tech-talk
References:
combining long strings Sintschuk, Michael via Tech-talk

Navigate by Date:
Prev: US ITER seeking Lead Software Engineer Vetter, Kurt G. via Tech-talk
Next: device support for Edwards active gauge controller Heinz Junkes 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: combining long strings Sintschuk, Michael via Tech-talk
Next: AW: combining long strings Sintschuk, Michael 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, 03 Feb 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·