OK thanks for the clarification.
Kind regards, Alan
On 03/26/2013 03:32 PM, Mark Rivers wrote:
The units that the motor record uses to talk to the driver are always integer steps, in spite of the fact that they are passed as doubles. The same is true for the readback.
So if your controller talks in doubles you need to scale the number in the driver to an integer (multiply by a number large enough to not lose encoder precision) and set MRES to the inverse of that number. That is what we do with the Newport XPS, for example.
Mark
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Alan Greer
Sent: Tuesday, March 26, 2013 10:23 AM
To: [email protected]
Subject: Motor Record precision
Hi, I have a question regarding motor record precision that I would like
clarified.
Setup
OS - Debian 6
EPICS base - R3.14.12.3
ASYN - R4.18
MOTOR - R6.7.1
I have sub-classed asynMotorController.cpp and when I read the position
of an axis I use the following lines to store the position values.
position and enc_position are both doubles.
setDoubleParam(pC_->motorPosition_, position);
setDoubleParam(pC_->motorEncoderPosition_, enc_position);
In the motor record instance the .RBV value appears to come back as an
integer, despite placing a double value into a double param.
eg.
Actual position = 106.501000390592
.RRBV = 106
.RBV = 106
Could someone give me some advice on setting up the precision that
doesn't involve me scaling the value up and then setting .MRES and .ERES?
Does .PREC do what I want?
Or have I missed something else?
Any help appreciated.
Kind regards, Alan Greer
- Replies:
- RE: Motor Record precision Mark Rivers
- References:
- Motor Record precision Alan Greer
- RE: Motor Record precision Mark Rivers
- Navigate by Date:
- Prev:
RE: Motor Record precision Mark Rivers
- Next:
RE: Motor Record precision Mark Rivers
- 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: Motor Record precision Mark Rivers
- Next:
RE: Motor Record precision Mark Rivers
- 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
|