What sets the value of "foo" so that it passes the test for true?
On 9/5/2013 2:54 PM, Konrad, Martin wrote:
Hello,
I am using a state machine to control a motor setup. In each step it
basically sends a command to the motor record and waits for it to
complete. This can be detected by the "done moving" field (DMOV).
Here is how I implemented this:
state1 {
entry {
sprintf(stateMsg, "state 1");
pvPut(stateMsg);
}
when(foo) {
motor = bar;
pvPut(motor, SYNC);
} state state2
}
state2 {
entry {
sprintf(stateMsg, "state 2");
pvPut(stateMsg);
}
}
Unfortunately this leads to a long delay between the motor starting to
move and the update of the status message (sometimes 10 seconds!).
I suspect I'm using sequencer the wrong way here. Are synchronous pvPuts
necessary to make sure the command has been send to the motor record?
Should I move the pvPut line to the end of the entry block of state2?
Are there some best practices how to keep the state machine code clean
and readable?
Thanks,
Martin
--
----------------------------------------------------------
Pete R. Jemian, Ph.D. <[email protected]>
Beam line Controls and Data Acquisition, Group Leader
Advanced Photon Source, Argonne National Laboratory
Argonne, IL 60439 630 - 252 - 3189
-----------------------------------------------------------
Education is the one thing for which people
are willing to pay yet not receive.
-----------------------------------------------------------
- References:
- seq and synchronous writes Konrad, Martin
- Navigate by Date:
- Prev:
seq and synchronous writes Konrad, Martin
- Next:
RE: seq and synchronous writes Mark Rivers
- 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:
seq and synchronous writes Konrad, Martin
- Next:
RE: seq and synchronous writes Mark Rivers
- 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
|