Hi,
I ran into the following issue using the Parker PC6K device support with
a Gemini GT6K controller:
The Parker command reference states that the s curve parameter AA
("average acceleration") and the acceleration parameter A have to
fulfill the following relation:
1/2*A <= AA < A
The PC6K device support always sets AA = 1/2*A to achieve the smoothest
possible move. In some rare circumstances the values send with the
commands do not fulfill the above relation. This seems to be caused by
limited floating point precision in combination with rounding. The bug
results in the motor controller ignoring the move command.
Please see the attached test case for details. A patch can be found here:
https://github.com/mark0n/motorRecord/commit/c09f92074f08a67dd319bda07e59464dbbe9912a
Please include this patch into the next revision of motor record.
Thanks,
Martin
--
Martin Konrad
Control System Engineer
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7253
Email: [email protected]
#include <stdio.h>
#define NINT(f) (long)((f)>0 ? (f)+0.5 : (f)-0.5) /* Nearest integer. */
double halfdouble(double dval) {
int intval = NINT(dval);
printf("%dA%d\t\t", 1, intval);
printf("%dAA%ld\n", 1, NINT(dval/2.0));
}
double halfint(double dval) {
int intval = NINT(dval);
printf("%dA%d\t\t", 1, intval);
printf("%dAA%d\n", 1, (intval % 2) ? intval / 2 + 1: intval / 2);
}
main() {
halfdouble(767.9);
halfdouble(768.9); /* the "half" value computed here is smaller than half the input! this is not allowed for PC6K controllers! */
halfdouble(769.9);
printf("\n");
halfdouble(768.0);
halfdouble(769.0);
halfdouble(770.0);
printf("\n");
halfdouble(768.1);
halfdouble(769.1);
halfdouble(770.1);
printf("\n*****\n\n");
halfint(767.9);
halfint(768.9); /* this implementation (hopefully) does it right: the "half" value is always half the input or greater */
halfint(769.9);
printf("\n");
halfint(768.0);
halfint(769.0);
halfint(770.0);
printf("\n");
halfint(768.1);
halfint(769.1);
halfint(770.1);
}
- Navigate by Date:
- Prev:
Re: how to put value to other record in subroutine record Andrew Johnson
- Next:
Re: Connecting EDM screens to multiple soft IOCs on the same machine on a separate subnet. Alan Greer
- 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: Connecting EDM screens to multiple soft IOCs on the same machine on a separate subnet. Alan Greer
- Next:
Rigol DS1204B scope support Brown, Garth
- 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
|