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  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Calibration for rotation motor of Micronix
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>, Jong Woo Kim <Jong.Woo.Kim at asu.edu>
Date: Wed, 24 Aug 2022 21:39:20 +0000
Hi Joon Woo,


This is the  MMC200Axis::move function.

asynStatus MMC200Axis::move(double position, int relative, double minVelocity, double maxVelocity, double acceleration)
{
  asynStatus status;
  // static const char *functionName = "MMC200Axis::move";

  status = sendAccelAndVelocity(acceleration, maxVelocity);
 
  if (relative) {
    sprintf(pC_->outString_, "%dMVR%.6f", axisIndex_, position * resolution_);
  } else {
    sprintf(pC_->outString_, "%dMVA%.6f", axisIndex_, position * resolution_);
  }
  status = pC_->writeController();
  return status;
}

The "position" argument is of type double, but it will in fact always have an integer value, which is distance/MRES.  So if you tell it to move 1 mm and MRES is 0.001 then position will be 1000.  If MRES is 0.0001 then position will be 10000.  This is done in the motor record, and is the same for all motor types.

Note that the MMC driver multiplies position by resolution_, which is a driver-specific value.

This is how resolution_ is computed in the axis constructor:

// Read the axis resolution (units = tens of picometers per full step)
  sprintf(pC_->outString_, "%dREZ?", axisIndex_);
  status = pC_->writeReadController();
  if (status != asynSuccess)
    errorFlag = 1;
  rez_ = atoi(&pC_->inString_[1]);

  // Read the number of microsteps
  if ( model_ == 200 )
  {
    // The MMC-200 has a variable number of microsteps
    sprintf(pC_->outString_, "%dUST?", axisIndex_);
    status = pC_->writeReadController();
    if (status != asynSuccess)
      errorFlag = 1;
    microSteps_ = atoi(&pC_->inString_[1]);
  }
  else
  {
    // The MMC-100 has a fixed number of microsteps
    microSteps_ = 100;
  }
 
  // Calculate motor resolution (mm / microstep)
  resolution_ = rez_ * 1e-8 / microSteps_;

So it reads the resolution in units of tens of picometers per full step, and divides that by microsteps, and multiplies by 1e-8 to get resolution in mm.

Please send the output of the report() function for this axis by typing this command

asynReport driver_name axis_number 1

where driver_name is the name of the Micronix asyn port, and axis_number is the number of this axis.

What value of MRES are you using?  

Please turn on asynTrace on the underlying TCP asyn driver and send the output when you move the motor by 1 EGU unit with your normal value of MRES, and with MRES 10 times larger than that.

Mark


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Jong Woo Kim via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, August 24, 2022 3:12 PM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Calibration for rotation motor of Micronix
 
Dear EPICS community:

I have a question about Micronix.

Controller: MMC100
Motor: PR-50, Analog encoder, rotation motor

When I edit MRES, it is changed correctly and UREV is also changed accordingly. [UREV = MRES * SREV]

The problem is that changes to motor-resolution fields have no effect on the actual motion of the motor.

* I am using motor-R7-1 in EPICS 3.15.6.

Is there any PV that prevents the above PVs from applying to the motor?

Best,
Jong Woo


References:
Calibration for rotation motor of Micronix Jong Woo Kim via Tech-talk

Navigate by Date:
Prev: RE: Making IOC spawn another IOC Engbretson, Mark S. via Tech-talk
Next: Re: Help compiling AreaDetector: error: variable ‘epicsShareClass NDAttribute’ has initializer but incomplete type Mark Rivers via Tech-talk
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  <20222023  2024 
Navigate by Thread:
Prev: Calibration for rotation motor of Micronix Jong Woo Kim via Tech-talk
Next: Making IOC spawn another IOC Marco A. Barra Montevechi Filho via Tech-talk
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  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·