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  <20182019  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  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Sequencer seem to skip states with EPICS 3.16.1
From: Ralph Lange <[email protected]>
To: EPICS Tech Talk <[email protected]>
Date: Wed, 31 Jan 2018 10:15:15 +0100
Have a look at

I think the SYNC option of pvPut(), which turns it into a blocking call, might help.

Cheers,
~Ralph


On Wed, Jan 31, 2018 at 10:01 AM, Simon Reiter <[email protected]> wrote:


On 01/31/2018 09:42 AM, Ralph Lange wrote:

Sorry, you lost me there.

The SNL compiler takes SNL source and produces C code. What do you mean by "the state machine is implemented in C++"?

Sorry, the C== part is external and should not influence the code. Forgot, what I just said.
In your original message you said that the 'camonitor' utility only shows READY -> RUNNING. So you seem to have a PV (I assume a local EPICS record) that is supposed to show the state.
In your SNL code excerpt there is no mention of such PV or when and how it is updated.
Please show all handling of that status PV in order to get feedback on it.
Here it goes:
#define SET_PV(pv_variable, value) \
{ \
    pv_variable = value; \
    pvPut(pv_variable); \
}
%%enum { State_UNKNOWN = 0, State_NOT_READY = 1, State_READY = 2, State_RUNNING = 3, State_LOADING=4, State_UNLOADING=5, State_STARTING=6, State_STOPPING=7, State_ABORTING=8, State_ERROR=11 };
int ERROR = FALSE;

ss onsenhw {
  state S_READY {
    entry {
      SET_PV(pv_state_current, State_READY);
      ERROR = FALSE;
    }
    when(pv_state_requested == State_RUNNING) {
    } state S_STARTING
  }
  state S_STARTING {
    entry {
      SET_PV(pv_state_current, State_STARTING);
    }
    when(!ERROR && pv_allow_running) {
    } state S_RUNNING
    when(pv_state_requested == State_READY) {
    } state S_STOPPING
  }

  state S_RUNNING {
    entry {
      SET_PV(pv_state_current, State_RUNNING);
      ERROR = FALSE;
    }
   ...
  }

I hope, this helps.

Cheers,
Simon


Replies:
Re: Sequencer seem to skip states with EPICS 3.16.1 Simon Reiter
References:
Sequencer seem to skip states with EPICS 3.16.1 Simon Reiter
Re: Sequencer seem to skip states with EPICS 3.16.1 Simon Reiter
Re: Sequencer seem to skip states with EPICS 3.16.1 Ralph Lange
Re: Sequencer seem to skip states with EPICS 3.16.1 Simon Reiter

Navigate by Date:
Prev: Re: Sequencer seem to skip states with EPICS 3.16.1 Simon Reiter
Next: EPICS database macro warning Amien Crombie
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Sequencer seem to skip states with EPICS 3.16.1 Simon Reiter
Next: Re: Sequencer seem to skip states with EPICS 3.16.1 Simon Reiter
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·