Experimental Physics and Industrial Control System
|
seqFlag should be an event, ie, type evflag, and should be set with efSet and examined with efTest[AndClear]. I've put that in your example below. When clauses do not poll but are triggered by events. evflag settings are events, as are changes to PVs, but changes of variables are not.
Carl
On Sat, Dec 31, 2011 at 3:43 PM, S. Stein <[email protected]> wrote:
Last question for 2011 from me - I promise!
I have a sequence program with a couple of state sets running. To enable a state transition in one state-set, I set (or reset) a variable (which does not correspond to an EPICS PV) - see example below. here is my issue: I cannot seem to get the 'wait' state in stateset 2 to fire off without toggling 'pv1'.
Here's what I do: assuming the PV 'epics:pv1C' is set to a BO record, I run the IOC. I see the console messages for the state sets firing off. I then set the VAL of 'epics:pv1C' to '1' and see that the ioc console responds with "PV Change state". After 2 seconds delay the internal variable 'seqFlag' is set to true, which _should_ (at least I think) fire off the 'wait' state in the second set, thus printing "Wait State Reached" on the IOC console. It does not. I have to set the PV 'epics:pv1C' to '0' and back to '1' to get the state transition to fire.
I don't think this behavior is appropriate - what say the community?
Contrived example:
/* epics variables */
short pv1; assign pv1 to "epics:pv1C"; monitor pv1;
/* sequencer variables */
evflag seqFlag;
ss set1 {
state init {
entry {
printf("Set 1 started\n");
}
when (pv1 == TRUE);{
printf("PV Change state\n");
} state seqHold
}
state seqHold {
when(delay(2)) {
efSet(seqFlag);
} state done
state done {
when(FALSE) {
} state init
}
}
ss set2 {
state init {
when(Delay(1){
printf("Set 2 started\n");
} state wait
}
state wait {
when ((pv1 == TRUE) && efTestAndClear(seqFlag)) {
printf("'Wait state' reached\n");
} state done
state done {
when(FALSE) {
} state init
}
}
-- Carl Lionberger Controls Software Engineer LBNL Engineering Division 510 486 7503
- Navigate by Date:
- Prev:
Re: Peculiar SNL behaviour Eric Norum
- Next:
Re: Peculiar SNL behaviour Tim Mooney
- 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
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Peculiar SNL behaviour Eric Norum
- Next:
Re: Peculiar SNL behaviour Tim Mooney
- 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
2018
2019
2020
2021
2022
2023
2024
|
ANJ, 18 Nov 2013 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|