EPICS Home

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: Simon Reiter <[email protected]>
To: [email protected]
Date: Tue, 30 Jan 2018 22:43:58 +0100
> 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++. 

Cheers, Simon

Replies:
Re: Sequencer seem to skip states with EPICS 3.16.1 Ralph Lange
References:
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 Ralph Lange
Next: Fwd: JSPS Postdoctral Fellowships for Research in Japan Noboru Yamamoto
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 Ralph Lange
Next: Re: Sequencer seem to skip states with EPICS 3.16.1 Ralph Lange
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