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  <20122013  2014  2015  2016  2017  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  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: stand-alone sequencer application question
From: "J. Lewis Muir" <[email protected]>
To: John Dobbins <[email protected]>
Cc: EPICS Tech Talk <[email protected]>
Date: Tue, 07 Feb 2012 12:27:11 -0600
On 2/7/12 11:57 AM, John Dobbins wrote:
> I have built a stand alone sequencer (2.0.11) application,
> something that is intended to be launched, run once and exit. I
> launch the program with the -s option to create an iocsh.
> 
> The program runs and operates as expected but after the program
> exits the behavior of the x-terminal from which the program was
> launched is altered. For example, pressing the 'enter' generates
> a new prompt but without a line-feed. If I type "reset" at the
> x-terminal command prompt I can restore normal operation of the
> x-terminal.
> 
> The final state of the program is:
> 
>     state finish {
>         entry {
>             ps_enable = 0;
>             pvPut( ps_enable, SYNC);
>         printf("rampTiSp cleanup\n");
>          }
>          when(delay(2)) {
>             exit(0);
>      } state finish
>     }
> 
> There are two state sets.
> 
> Is there a better way to exit the program?

Hi, John.

I would think that would be fine.

Does a soft IOC built against the same EPICS Base exit OK?

You could try calling epicsExit instead of the standard C
library exit.

You could try the new Sequencer (2.1.4) and see if it has the
same problem.

Also, the new Sequencer has a "when" transition "exit" keyword
to indicate the program should exit.  The documentation notes
that if running under an IOC shell, only the SNL program exits,
not the whole IOC.  But if one wants to exit the IOC, it
suggests placing the standard C library exit function call in
the global exit block of the SNL program.  I doubt this would
make a difference, but you could try it.

For example:

  ...

  ss SomeStateSet {

    ...

    state finish {
      entry {
        ps_enable = 0;
        pvPut( ps_enable, SYNC);
        printf("rampTiSp cleanup\n");
      }
      when(delay(2)) {
      } exit
    }
  }

  exit {
    exit(0);
  }

Lewis

References:
stand-alone sequencer application question John Dobbins

Navigate by Date:
Prev: stand-alone sequencer application question John Dobbins
Next: RE: Virtual circuit disconnect - caRepeater bug? Hill, Jeffrey O
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: stand-alone sequencer application question John Dobbins
Next: Obtain latest version of JCA Shankar, Murali
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·