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: Question about asynMotor record, limits |
From: | Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, Borys Lysyansky <bor.lys at gmail.com> |
Date: | Fri, 21 Apr 2023 13:17:11 +0000 |
Hi Boris,
The problem is that the software limit checking is done in the EPICS motor record, not in the driver. The motor record does send those limits to the driver, because in some cases the controller can also act on them. But writing those values to the controller
as you are doing does not set them in the motor record. Your program should set the limits in the record, not in the driver.
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Borys Lysyansky via Tech-talk <tech-talk at aps.anl.gov>
Sent: Friday, April 21, 2023 5:33 AM To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: Question about asynMotor record, limits I have the following problem:
I have my asynMotor record with the following lines in motor.substitutions: {P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} {PREFIX:, 1, "WL", "asynMotor", MyController, 0, "motor $(N)", nm, Pos, .0, .0, .0, 0, 1, .2, 1e-6, 6, 17, 2, "0"} During the program run I would like to change the motor limits, which are now 2..17 with the following code: auto status1 = m_pAxes[0]->setDoubleParam(motorLowLimit_, newLowValue * 1e6); auto status2 = m_pAxes[0]->setDoubleParam(motorHighLimit_, newHighValue * 1e6); Both obtained status are asynSuccess. I have also checked the result by calling
double lowLimit = 0, highLimit= 0;
getDoubleParam (0, motorLowLimit_, &lowLimit);getDoubleParam (0, motorHighLimit_, &highLimit);
It was also correct. However, I would expect that the new low/high limits
should have impact on commands
caput PREFIX:WL.VAL someValue
However, the program behavior here is somehow strange.
Could you, please, explain me it.
With best wishes,
Boris
|