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: "Celcer Tine \(PSI\) via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 28 Sep 2022 14:57:12 +0000
addendum: The delay is actually on the TwinCAT PLC between issuing the EXECUTE command and the time of setting the DONE flag to “ACTIVE”.
--
Dr. Tine Celcer
Controls Section
Group Leader Integration and Support – Photon Science
Group Leader a.i. Integration and Support – Large Research Facilities

WBGB/013
Phone: +41 56 310 46 29 
tine.celcer at psi.ch

Paul Scherrer Institut
CH-5232 Villigen PSI


On 28 Sep 2022, at 16:32, Celcer Tine (PSI) <Tine.Celcer at psi.ch> wrote:

Hi all,

We use a Beckhoff TwinCAT controller to move 3 independent axes, and it is integrated into EPICS via the s7 driver. Now I am trying to add the soft motor record support on top of that. Everything works fine except for a problem with the .DMOV field. The .DINP filed is linked to the DONE flag of the TwinCAT controller.

When initiating the motion from “s7” EPICS PVs, the soft motor DMOV field behaves as expected, however when the move is initiated by the motor record I get the 1/0/1/0/1 pulse form the DMOV instead of the desired 1/0/1 (of course any user script monitoring the DMOV would capture that additional pulse). I notice that the first 1/0/1 pulse happens before the DONE flag changes to 0, and the remaining /0/1 part is in accordance with the processing of the DONE flag (as expected via ca link).

I suspect that the reason is in the way the Twincat motion is implemented - one has to set the position first and then execute the “GO” command. I handle this with a sequence record that is linked to the OUT filed of the motor record. Could the fact that there is a delay between the time of writing to the motor record .VAL field and the time that the “GO” command is issued on the PLC and the DONE flag processes, cause the initial 1/0/1 pulse on the motor record .DMOV field (thinking there is no move - analog to sending it to the current position)?

And if this is the case, is there a “timeout” I could set for that? Or any other ideas how to overcome this issue?

——
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)_DONE NPP") 
  field(RTRY, "0")
  field(NTM,  "NO")
}

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

---------

Thanks,

Tine  

 
--
Dr. Tine Celcer
Controls Section
Group Leader Integration and Support – Photon Science
Group Leader a.i. Integration and Support – Large Research Facilities

WBGB/013
Phone: +41 56 310 46 29 
tine.celcer at psi.ch

Paul Scherrer Institut
CH-5232 Villigen PSI




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

Navigate by Date:
Prev: DMOV flag problem with soft motor Celcer Tine (PSI) via Tech-talk
Next: Re: DMOV flag problem with soft motor Torsten Bögershausen 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: DMOV flag problem with soft motor Celcer Tine (PSI) via Tech-talk
Next: Re: DMOV flag problem with soft motor Torsten Bögershausen 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, 28 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·