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: DMOV flag problem with soft motor
From: Kevin Peterson via Tech-talk <tech-talk at aps.anl.gov>
To: Torsten Bögershausen <torsten.bogershausen at ess.eu>, "Celcer Tine (PSI)" <tine.celcer at psi.ch>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 29 Sep 2022 09:19:59 -0500
The motor record sets the DMOV to 0 when the soft motor's target position changes. After that it looks at the PV specified in the DINP field and expects the value to be 0 until motion is done. If there is a delay in updating the DINP PV, the unwanted extra DMOV transition occurs.

I believe you can work around the problem by doing the following to ensure the DINP PV is moving *before* the move is initiated:

record(motor, "$(P):$(AXIS)") {
  field(DESC, "$(AXIS) soft motor")
  field(DTYP, "Soft Channel")
  field(OUT,  "$(P):$(AXIS)_SETANDGO PP")
  field(RDBL, "$(P):$(AXIS)_RBVCALC NPP")
  field(MRES, "1")
  field(RRES, "1")
  field(URIP, "Yes")
  field(PREC, "2")
  field(EGU,  "mm")
  field(TWV,  "1")
  field(DINP, "$(P):$(AXIS)_DMOV NPP")
  field(RTRY, "0")
  field(NTM,  "NO")
}

record(seq, "$(P):$(AXIS)_SETANDGO") {
  field(DOL1, "1")
  field(LNK1, "$(P):$(AXIS)_MOVING PP")
  field(DOL2, "$(P):$(AXIS).DVAL")
  field(LNK2, "$(P):$(AXIS)_SETPOS PP")
  field(DOL3, "1")
  field(LNK3, "$(P):$(AXIS)_EXECUTE PP")
}

record(bo, "$(P):$(AXIS)_MOVING") {
  field(ONAM, "Done")
  field(ZNAM, "Moving")
}

record(calcout, "$(P):$(AXIS)_DMOV") {
  field(INPA, "$(P):$(AXIS)_MOVING CP")
  field(CALC, "!A")
}

record(calcout, "$(P):$(AXIS)_RESET") {
  field(INPA, "$(P):$(AXIS)_DONE CP")
  field(CALC, "A")
  field(OOPT, "Transition to Non-zero")
  field(DOPT, "Use OCAL")
  field(OCAL, "!A")
  field(OUT, "$(P):$(AXIS)_MOVING")
}

I haven't tested it, though, so it might not work as advertised.

Kevin

On 9/28/22 10:17, Torsten Bögershausen via Tech-talk wrote:
this smells a little bit like the
"done before even started" phenomenon.

The controller is commanded to move, execute is set, but it hasn't
started yet.

References:
DMOV flag problem with soft motor Celcer Tine (PSI) via Tech-talk
Re: DMOV flag problem with soft motor Celcer Tine (PSI) via Tech-talk
Re: DMOV flag problem with soft motor Torsten Bögershausen via Tech-talk

Navigate by Date:
Prev: Re: asynMotorController weird behavior when using any read/write interface mask Mark Rivers via Tech-talk
Next: Suspicious behavior of Pmac 2-5-16 IOC. .RBV and .VAL showing wrong values. 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 
Navigate by Thread:
Prev: Re: DMOV flag problem with soft motor Torsten Bögershausen via Tech-talk
Next: Change PVA structure dynamically during IOC operation Alnajjar, Dawood 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, 29 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·