Hi.
We are using motorRecord (a locally modified version 3.4) with external
readback
(via link) enabled.
The OMS 58 controller overflows at +/- 33.554.432 steps, which seems to
be
a lot. However, we are actually using almost the full range.
If external readback is enabled, the motorRecord is using relative
motion commands
causing step count register drift and occasional overflows. When this
happens, things
go haywire.
My fix (only active if URIP and RDBL present) calculates the true
position based upon
the readback value when the motor stops and writes that value to the
motor hardware.
Cheers, Till.
---------------------------------------------------------------
This patch fixes:
- if an external readback link is used, the position should be written
back
to the controller hardware to avoid drift which may overflow the step
register.
by T. Straumann (PTB)
Index: motorRecord.c
===================================================================
RCS file: /opt/csr/CVS/till/epicsApps/records/motorRecord.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- motorRecord.c 1999/01/28 15:08:38 1.3
+++ motorRecord.c 1999/04/01 16:33:38 1.4
@@ -937,6 +941,26 @@
if (pmr->mip & MIP_DELAY_ACK || (ticks <= 0)) {
pmr->mip &= ~MIP_DELAY; MARK(M_MIP); /* done
delaying */
(void)maybeRetry(pmr);
+ /* T. Straumann 4/1/1999:
+ * If we using an external readback, we should
+ * write the position back to the motor hardware.
+ * E.g. the OMS VME58 controller overflows at
+ * +/- 2^25 steps. With an external readback,
+ * steps may be lost which may cause drift of
+ * the position value maintained by the
controller.
+ * Eventually this may cause overflow.
+ *
+ * We happen to use almost the whole range of
steps;
+ * therefore, after running for some time an
overflow
+ * occasionally occured.
+ */
+ if ( pmr->urip ) {
+ double newpos = pmr->dval / pmr->res;
+ /* dump the position to the controller */
+ INIT_MSG();
+ WRITE_MSG(LOAD_POS, &newpos);
+ SEND_MSG();
+ }
} else {
int status;
pmr->mip |= MIP_DELAY_REQ; MARK(M_MIP);
- Navigate by Date:
- Prev:
Re: CAN Bus hardware/interface suggestions? Please? Joachim . Rahn
- Next:
Allen Bradley 6008-SV2R/MVME177 Compatibility John K.J. Dong
- 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: CAN Bus hardware/interface suggestions? Please? Joachim . Rahn
- Next:
Allen Bradley 6008-SV2R/MVME177 Compatibility John K.J. Dong
- 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
|