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  <20162017  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  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Motor Module, Deferred Movement, .VAL field set to .RBV after motion
From: Ron Sluiter <[email protected]>
To: Jacob DeFilippis <[email protected]>
Cc: [email protected]
Date: Wed, 29 Jun 2016 14:23:10 -0500
Hello Jacob,

What version (VERS field) of the motor record are you using?

The folks at Diamond are the experts in the use of the motor record deferred move function. I defer to them on this topic.

Ron

On 6/29/2016 1:32 PM, Jacob DeFilippis wrote:
Hello,
I am working on implementing a multiple axis synchronized motion using the motor module's asynController base class (model 3). The move function is set up such that it stores the .VAL to variables inside the physical controller when the deferredMove flag is 1, and when there is a transition from 1-> 0 on the flag I issue the controller command that moves the motors synchronously to the commanded target.

My problem is when the move completes the .VAL field is set to the .RBV field. This happens when the .DMOV is returned to 1. I tracked down the cause, which is found in motorRecord.cc in function postProcess(motorRecord * pmr) line 762 (In the github repo). It executes "pmr->val = pmr->rbv" . I am unsure why this postprocess is occurring. Is there anything extra I should implement in my function that issues synchronized motion? or possibly something extra in the polling function. Is this because the RTRY field is set to 0?

An example of the bad behavior:
SMOTOR:AXIS:1.VAL                 2016-06-29 11:05:24.259733 4
SMOTOR:AXIS:1.DMOV            2016-06-29 11:05:24.474977 1
SMOTOR:AXIS:1.RBV                2016-06-29 11:05:27.892752 3.0181
SMOTOR:AXIS:1.DMOV            2016-06-29 11:05:27.892752 0
SMOTOR:AXIS:1.RBV                2016-06-29 11:05:30.090092 3.4665
SMOTOR:AXIS:1.RBV                2016-06-29 11:05:32.287451 3.9155
SMOTOR:AXIS:1.RBV                2016-06-29 11:05:34.484984 3.9993
SMOTOR:AXIS:1.VAL 2016-06-29 11:05:34.484984 3.9993 <--My problem
SMOTOR:AXIS:1.DMOV            2016-06-29 11:05:34.484984 1

My motor record
record(motor, "$(P):$(M):$(ADDR)") {
  field(SCAN, "Passive")
  field(DTYP, "asynMotor")
  field(DISS, "NO_ALARM")
  field(DIR, "$(DIR)")
  field(VELO, "$(VELO)")
  field(VBAS, "$(VBAS)")
  field(VMAX, "$(VMAX)")
  field(URIP, "No")
  field(PREC, "4")
  field(EGU, "mm")
  field(MRES, "$(MRES)")
  field(OUT, "@asyn($(PORT),$(ADDR))")
  field(TWV, ".1")
  field(ASG, "MC_MAINT")
  field(FOFF, "Frozen")
  field(PRIO, "HIGH")
  field(OMSL, "closed_loop")
  field(RTRY, "0")
}

My function that triggers synchronized motion
asynStatus Axis::processDeferredMoves()
{
  asynStatus status;

  /*resets controller flag*/
   status = resetFlags();
   if(status) goto skip;

  /*sends command to start synchronized motion*/
   sprintf(pC_->outString_,GOSYNC);
   status = pC_->writeController();

   skip:
   setIntegerParam(pC_->motorStatusDone_, 0);
   setIntegerParam(pC_->motorStatusCommsError_, status ? 1:0);
   callParamCallbacks();
   pC_->wakeupPoller();
   return asynSuccess;
}

Thanks in advance,
Jacob


Replies:
RE: Motor Module, Deferred Movement, .VAL field set to .RBV after motion Mark Rivers
References:
Motor Module, Deferred Movement, .VAL field set to .RBV after motion Jacob DeFilippis

Navigate by Date:
Prev: Motor Module, Deferred Movement, .VAL field set to .RBV after motion Jacob DeFilippis
Next: RE: Motor Module, Deferred Movement, .VAL field set to .RBV after motion 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  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Motor Module, Deferred Movement, .VAL field set to .RBV after motion Jacob DeFilippis
Next: RE: Motor Module, Deferred Movement, .VAL field set to .RBV after motion 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  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·