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  <20162017  2018  2019  2020  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  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: sequencer error
From: Ralph Lange <[email protected]>
To: EPICS Tech-Talk <[email protected]>
Cc: Silver <[email protected]>
Date: Wed, 30 Mar 2016 10:32:07 +0200
Hi Geyang,

In the EPICS build system, .stt files are *not* preprocessed by the C preprocessor.
If your want your SNL source to be preprocessed (e.g. to use #define statements), rename it to have an .st extension instead.

Cheers,
~Ralph


On 30/03/2016 09:52, Silver wrote:
hi, 

I want to define some marco in stt file, for example, "#define N 3" to the example coming with exampleApp, when compiling it, it shows:
compiling ../sncExample.stt to C
/usr/local/epics/r3.14.12.5/base/../modules/seq-2.2.3/bin/linux-x86/snc +r ../sncExample.stt -o sncExample.c
../sncExample.stt:6: lexical error: invalid character
../sncExample.stt:6: syntax error near token ''
../sncExample.stt:6: parser giving up
make[3]: *** [sncExample.c] Error 1
what's the reason? I did remember others use "define"  in stt file, for example, procServControl.
thanks a lot for your help.

-------------------------------sncExample.stt----------------------
program sncExample

double v;
assign v to "{user}:aiExample";
monitor v;
#define N1 3 /*just add this line*/
ss ss1 {
state init {
when (delay(10)) {
printf("sncExample: Startup delay over\n");
} state low
}
state low {
when (v > 5.0) {
printf("sncExample: Changing to high\n");
} state high
}
state high {
when (v <= 5.0) {
printf("sncExample: Changing to low\n");
} state low
}
} 
 
 
 

Best wishes
Geyang 2016-03-30
 
 


References:
sequencer error Silver

Navigate by Date:
Prev: sequencer error Silver
Next: RE: Job Posting - Applications/Controls Engineer (I-6) / Advanced Applications/Controls Engineer (I-7) - 24 month term - Brookhaven National Laboratory Esposito, Peter J
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: sequencer error Silver
Next: RE: Job Posting - Applications/Controls Engineer (I-6) / Advanced Applications/Controls Engineer (I-7) - 24 month term - Brookhaven National Laboratory Esposito, Peter J
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·