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> 2025 | 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> 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Galil advice for servo motors |
From: | Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> |
To: | "Pearson, Matthew" <pearsonmr at ornl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Thu, 18 Jan 2024 23:15:31 +0000 |
Hi Matt, Thanks for the reply. Actually setting the PCOF, ICOF, and DCOF fields in the motor record does set the PID values on the Galil controller, and it does do scaling from the 0-1 PID values in the driver to the values used by the controller.
For example, the proportional gain code is here: That setPGain function is called from asynMotorController when the PCOF field in the record is changed. The scaling from 0-1 is done by multiplying by KPMAX, the maximum allowed KP value in the Galil controllers, 1023.875. So simply adding PCOF, ICOF, and DCOF to autosave should be a persistent way to set those coefficients. Mark From: Pearson, Matthew <pearsonmr at ornl.gov>
Hi Mark, I seem to remember the PID fields in the motor record are restricted to 0-1 values, which is of limited use. The motor record documentation mentions scaling can be done by the driver, but I’m not aware of any model 3 driver doing this and
it would be confusing. In the Galil driver it seems like the functions were implemented: grep -r set.Gain * GalilSup/src/GalilAxis.h: asynStatus setPGain(double pGain); GalilSup/src/GalilAxis.h: asynStatus setIGain(double iGain); GalilSup/src/GalilAxis.h: asynStatus setDGain(double dGain); But they are not called in the GalilController class, and there are no associated records for setting KP, KI or KD in the galil_motor_extras.template. So I suspect it was never fully implemented.
It wouldn’t take too much to add driver parameters and records to call those functions, but a quick work around would be to manually set KP, KI or KD by sending strings to $(P)SEND_STR_CMD after IOC init, either via a few ‘dbpf’ commands
or a set of stringout records. Cheers, Matt From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Mark Rivers via Tech-talk Folks, I have been using the Galil DMC-4183 controllers for stepper motors, both with pulse/direction outputs and on-board amplifiers. I now am setting up my first servo system with on-board amplifiers and quadrature encoders. I have a question about the best way to configure and save the PID parameters. Do people generally using the motor record
to configure KP, KI, and KD, or do you use the Galil GDK to configure those and then just save in the non-volatile memory on the controller? I did not find any discussion of this in the EPICS Galil documentation. Thanks, Mark |