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 09:42:34 +0100
On Tue, Jan 30, 2018 at 10:43 PM, Simon Reiter <[email protected]> wrote:
> What record type do you use to represent your state?
>
> In the CA server, updates for strings are handled using a reference (pointer) in the queue, while numerical type updates put their value in the queue.
> If your record has a string value, two fast subsequent writes to it may actually lead to the first string never being sent, if it gets overwritten while the event with the pointer to it is still in the outgoing queue. In that case, it might be better to use an mbbi or mbbo (enum type) record, because an enum's natural type is numerical, while it still has nice string representations for its states.

The state machine is already built up with mbbi and mbbo records.

Here is an excerpt  of the state machine. Maybe this helps to discover some misbehavior:
> state S_READY {
>     entry {
>         // some logging
>     }
>     when(pv_state_request == STATE_RUNNING) {
>     } state S_STARTING
> }
> state S_STARTING {
>     entry {
>         // some logging
>     }
>     when(pv_allow_running) { // this pv is in most cases already 1.
>     } state S_RUNNING
> }
> state S_RUNNING {
>     entry {
>         // some logging
>     }
>     …..
> }
S_ = states
STATE_ = enum values

BTW: In order to use logging, this state machine is implemented in C++.


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++"?

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.

Cheers,
~Ralph


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

Navigate by Date:
Prev: Re: Java API JCA / CAJ DBR_LONG matej . sekoranja
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 
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 ·