To users of the motor record:
This code segment from recMotor.c is causing me some problems. Stops are issued
when they should not be. I think this is happening because the axis is queried
before it has started moving and the last move was in the opposite direction from
the current move.
Has this been a problem for others? What would you recommend doing to fix it?
Debug statements with my comments are below as well.
Janet Tvedt
---------------------------------------------------------------------------
Janet Tvedt, Engineering Technical Services Internet: [email protected]
National Optical Astronomy Observatories Phone: (520) 318-8388
950 N. Cherry Ave., Tucson, AZ 85719 FAX: (520) 318-8360
Code Segment
-------------
/*
* Are we going in the wrong direction? (Don't be
* fooled by a backlash correction into saying "yes".
* 'Jog*' and 'Hom*' motions don't get midcourse
* corrections since we don't know their
* destinations.)
*/
Debug(10, "process: rvel = %d\n", pmr->rvel);
if ((fabs(pmr->diff) > 2 * (fabs(pmr->bdst) + pmr->rdbd)) &&
((pmr->rval > pmr->rrbv) != (pmr->tdir == 1)) &&
(pmr->rvel != 0) && (MARKED(M_RRBV)) &&
((pmr->mip == MIP_MOVE) || (pmr->mip == MIP_RETRY))) {
/*
* We're going in the wrong direction.
* Readback problem?
*/
Debug(2, "process: wrong direction, diff = %f\n", pmr->diff);
/* printf("%s:tdir = %d\n", pmr->name, pmr->tdir);*/
INIT_MSG();
WRITE_MSG(MOTOR_STOP_AXIS, NULL);
SEND_MSG();
pmr->mip |= MIP_STOP;
MARK(M_MIP);
}
Debug Statements
----------------
sent message (AX QA RP RE EA
)
recv_mess: card 1 com PDNN,26130,4863,DDNNNN
info = (PDNN,26130,4863,DDNNNN)
sent message (AX RA
)
recv_mess: card 1 com PDNN <=========== last move in Pos direction
sent message (AX AF VB37 VL2048 AC1024 MR-767 GD AN IP <=========== new move in Neg direction
)
sent message (AX QA RP RE EA
)
recv_mess: card 1 com PNNN,26129,4864,DDNNNN <=========== first QA still says Pos direction
info = (PNNN,26129,4864,DDNNNN)
sent message (AX QA RP RE EA
)
recv_mess: card 1 com MNNN,26127,4864,DDNNNN <=========== next QA is correct
info = (MNNN,26127,4864,DDNNNN)
sent message (AX AF ST AN IP <==================== stop already issued
)
sent message (AX QA RP RE EA
)
recv_mess: card 1 com MDNN,26117,4864,DDNNNN
info = (MDNN,26117,4864,DDNNNN)
sent message (AX RA
)
recv_mess: card 1 com MDNN
- Replies:
- Re: Stops in the motor record Graham Waters
- Navigate by Date:
- Prev:
May 98 Collaboration Meeting Bob Dalesio
- Next:
Re: Stops in the motor record Graham Waters
- 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:
May 98 Collaboration Meeting Bob Dalesio
- Next:
Re: Stops in the motor record Graham Waters
- 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
|