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  <20222023  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  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Sequencer - Compiling multiple source files together
From: "Manoussakis, Adamandios via Tech-talk" <tech-talk at aps.anl.gov>
To: "Johnson, Andrew N." <anj at anl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Fri, 14 Jan 2022 00:35:57 +0000

I did find this documentation for basic macroing

 

program example ("unit=ajk, stack=11000")

 

/*=================== declarations =========================*/

float ao1;

assign ao1 to "{unit}:ao1";

monitor ao1;

 

but when I do record macros I am able to create multiple copies of records using different values eg.    Test = Device1, Test = Device 2 when using dbloadrecords in st.cmd

 

is there a similar way to do this with the sequencer, where I have a example.st that has macros but I want 3 copies of it with different values for the macro?

 

Adam

 

From: Johnson, Andrew N. <anj at anl.gov>
Sent: Thursday, January 13, 2022 4:14 PM
To: Manoussakis, Adamandios <manoussakis1 at llnl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Re: Sequencer - Compiling multiple source files together

 

On Jan 13, 2022, at 5:54 PM, Manoussakis, Adamandios <manoussakis1 at llnl.gov> wrote:

 

The example files helped a ton, got it to compile now.

 

Good, it’s often worth looking at the makeBase examples for build questions, they demonstrate a lot of standard ways of doing things.



Planning on messing with macroing within the sequencer as well, is the easiest way to just set some env variables in envPaths file that I load in the st.cmd?

 

The envPaths file is generated automatically from the contents of the configure/RELEASE file, so I don’t recommend modifying that by hand as you can easily lose your changes when you rebuild. There are many ways to set environment variables though, from epicsEnvSet in the st.cmd file itself (or in some other .cmd file which it loads) to whatever tools you’re using to start the IOC. The IOC shell can expand environment variables directly from your st.cmd script, thus easily passing them into sequence program macros, or you can even call getenv() inside your sequence program actions. There is also device support provided for the stringin and lsi record types to read environment variables values into the database.

 

HTH,

 

- Andrew

 



 

From: Johnson, Andrew N. <anj at anl.gov> 
Sent: Thursday, January 13, 2022 10:43 AM
To: Manoussakis, Adamandios <manoussakis1 at llnl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Re: Sequencer - Compiling multiple source files together

 

Hi Adam, 

 

The sequencer’s build rules run each .st file through the C Preprocessor (generating the .i file which you’ll see in the O.<arch> directory) before compiling the result to a .c file, so you can use #include statements to pull the sources of other files into the .st that you ask the build system to compile. The result must of course be syntactically correct and you’ll need to be careful to not re-use the same global variable names in different sequences, but you should be able to split up your existing large file quite easily using that.

 

The makeBaseApp example uses that to compile the sncProgram.st file, although that is to generate a stand-alone executable so the Makefile entries will look slightly different.

 

HTH,

 

- Andrew

 




On Jan 13, 2022, at 12:28 PM, Manoussakis, Adamandios via Tech-talk <tech-talk at aps.anl.gov> wrote:

 

Hey All,

 

Is it possible to have multiple .st files and compile them together similar to #include in C and compiling the multiple .c files?  I couldn’t find anything explicit in the documentation, only that I could add in the SRCS += *.st files in the Makefile but I think this only compiles each st file separately?  My Goal is to separate out the multiple sequencers that I have currently in a large .st file.

 

Thanks,

Adam

 

-- 

Complexity comes for free, simplicity you have to work for.

 

-- 

Complexity comes for free, simplicity you have to work for.

 


Replies:
Re: Sequencer - Compiling multiple source files together Ralph Lange via Tech-talk
References:
Sequencer - Compiling multiple source files together Manoussakis, Adamandios via Tech-talk
Re: Sequencer - Compiling multiple source files together Johnson, Andrew N. via Tech-talk
RE: Sequencer - Compiling multiple source files together Manoussakis, Adamandios via Tech-talk
Re: Sequencer - Compiling multiple source files together Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: Re: Sequencer - Compiling multiple source files together Johnson, Andrew N. via Tech-talk
Next: Re: Sequencer - Compiling multiple source files together 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  2021  <20222023  2024 
Navigate by Thread:
Prev: Re: Sequencer - Compiling multiple source files together Johnson, Andrew N. via Tech-talk
Next: Re: Sequencer - Compiling multiple source files together 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  2021  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·