The problem is that synchronous puts to the motor record wait for the motor to stop moving, or the timeout (10 seconds default) to occur. You don't want to use SYNC here.
Mark
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Konrad, Martin
Sent: Thursday, September 05, 2013 2:55 PM
To: [email protected]; [email protected]
Subject: seq and synchronous writes
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
- References:
- seq and synchronous writes Konrad, Martin
- Navigate by Date:
- Prev:
Re: seq and synchronous writes Pete Jemian
- Next:
Re: seq and synchronous writes Konrad, Martin
- 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: seq and synchronous writes Pete Jemian
- Next:
Re: seq and synchronous writes Konrad, Martin
- 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
|