g+
g+ Communities
Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014 
<== Date ==> <== Thread ==>

Subject: C function in when() clause of sequencer
From: Dennis Nicklaus <nicklaus@fnal.gov>
To: tech-talk@aps.anl.gov
Date: Wed, 03 Jan 2007 11:19:28 -0600
Hi,
Is it possible to call a C function to avoid having a very cumbersome when clause in my epics
sequencer program? I get some compiler error or other when I try different variations,
so I'm hoping someone can tell me the best way to handle this.



What I want is instead of this: when ((vacuumReading >vacuum_high) ||(tempReading >tempCerm_high) ||(eminusReading >electron_high) ||(pmtReading >pmtlight_high)) { } state backOff

I would like to do this:
%{
/*
   This function checks for exceeding any of the soft limits.
*/
static int softCheck()
{
   return(
   (vacuumReading >vacuum_high)
   ||(tempReading >tempCerm_high)
   ||(eminusReading >electron_high)
   ||(pmtReading >pmtlight_high)
   );
}
}%

...
     when (softCheck())
     } state backOff

Thanks,
Dennis




Replies:
RE: C function in when() clause of sequencer Chestnut, Ronald P.
RE: C function in when() clause of sequencer Al Honey

Navigate by Date:
Prev: Re: Next EPICS Meeting ? Andrew Johnson
Next: RE: C function in when() clause of sequencer Chestnut, Ronald P.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014 
Navigate by Thread:
Prev: Re: Next EPICS Meeting ? Andrew Johnson
Next: RE: C function in when() clause of sequencer Chestnut, Ronald P.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·