Experimental Physics and Industrial Control System
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
- Replies:
- Re: seq and synchronous writes Pete Jemian
- RE: seq and synchronous writes Mark Rivers
- RE: seq and synchronous writes Mooney, Tim M.
- Navigate by Date:
- Prev:
PMAC VME card base address issue Chen Xue
- Next:
Re: seq and synchronous writes Pete Jemian
- 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: PMAC VME card base address issue Emma Shepherd
- Next:
Re: seq and synchronous writes Pete Jemian
- 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