EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Motor Record precision
From: Mark Rivers <[email protected]>
To: "'Alan Greer'" <[email protected]>, "[email protected]" <[email protected]>
Date: Tue, 26 Mar 2013 15:32:39 +0000
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 Alan Greer
References:
Motor Record precision Alan Greer

Navigate by Date:
Prev: Motor Record precision Alan Greer
Next: Re: Motor Record precision Alan Greer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Motor Record precision Alan Greer
Next: Re: Motor Record precision Alan Greer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·