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  2022  <20232024  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  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: second relative motion stuck in a do loop
From: Kevin Peterson via Tech-talk <tech-talk at aps.anl.gov>
To: "Tran, Phi Dung" <ptran1 at bnl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 14 Nov 2023 09:48:10 -0600
Phi,

I'm not able to reproduce the problem of the motors staying at 1 on subsequent 1-unit relative moves.

I do see errors in the positions after the 2nd move following a reset of motor positions to zero. Here is the camonitor output for three relative 2-unit moves:

$ camonitor kmp3:test:m1.VAL kmp3:m{1,2,3}.VAL
kmp3:test:m1.VAL               2023-11-14 09:27:07.187920 0
kmp3:m1.VAL                    2023-11-14 09:27:07.122334 0
kmp3:m2.VAL                    2023-11-14 09:27:07.155012 0
kmp3:m3.VAL                    2023-11-14 09:27:07.274250 0

kmp3:m1.VAL                    2023-11-14 09:27:41.662214 2
kmp3:m2.VAL                    2023-11-14 09:27:41.662305 2
kmp3:m3.VAL                    2023-11-14 09:27:41.662371 2
kmp3:test:m1.VAL               2023-11-14 09:27:41.662412 2

kmp3:m1.VAL                    2023-11-14 09:27:50.711933 6
kmp3:m2.VAL                    2023-11-14 09:27:50.712022 6
kmp3:m3.VAL                    2023-11-14 09:27:50.712092 6
kmp3:test:m1.VAL               2023-11-14 09:27:50.712132 4
kmp3:m1.VAL                    2023-11-14 09:27:53.170613 4.21
kmp3:m2.VAL                    2023-11-14 09:27:53.170687 4.21
kmp3:m3.VAL                    2023-11-14 09:27:53.170748 4.21

kmp3:m1.VAL                    2023-11-14 09:28:05.077614 10.21
kmp3:m2.VAL                    2023-11-14 09:28:05.077647 10.21
kmp3:m3.VAL                    2023-11-14 09:28:05.077673 10.21
kmp3:test:m1.VAL               2023-11-14 09:28:05.077689 6
kmp3:m1.VAL                    2023-11-14 09:28:07.302760 6.21
kmp3:m2.VAL                    2023-11-14 09:28:07.302867 6.21
kmp3:m3.VAL                    2023-11-14 09:28:07.302960 6.21

Note: kmp3:test:m1 is my soft motor and kmp3:m{1,2,3} are my "real" motors.

I suspect the error that is introduced is much smaller for you because the galil support using a much higher moving poll frequency that my simulated motors.

Changing the $(P)-F fanout so that it outputs to the real motors' VAL fields instead of their RLV fields remains the simplest solution. This is what the same series of 2-unit relative moves looks like after that fix:

$ camonitor kmp3:test:m1.VAL kmp3:m{1,2,3}.VAL
kmp3:test:m1.VAL               2023-11-14 09:21:57.513328 0
kmp3:m1.VAL                    2023-11-14 09:21:28.188527 0
kmp3:m2.VAL                    2023-11-14 09:21:28.232332 0
kmp3:m3.VAL                    2023-11-14 09:21:28.264741 0

kmp3:m1.VAL                    2023-11-14 09:22:08.629501 2
kmp3:m2.VAL                    2023-11-14 09:22:08.629531 2
kmp3:m3.VAL                    2023-11-14 09:22:08.629542 2
kmp3:test:m1.VAL               2023-11-14 09:22:08.629561 2

kmp3:m1.VAL                    2023-11-14 09:22:14.873323 4
kmp3:m2.VAL                    2023-11-14 09:22:14.873386 4
kmp3:m3.VAL                    2023-11-14 09:22:14.873428 4
kmp3:test:m1.VAL               2023-11-14 09:22:14.873488 4

kmp3:m1.VAL                    2023-11-14 09:22:26.848583 6
kmp3:m2.VAL                    2023-11-14 09:22:26.848654 6
kmp3:m3.VAL                    2023-11-14 09:22:26.848695 6
kmp3:test:m1.VAL               2023-11-14 09:22:26.848722 6

If you really need the real motors to do relative moves, you'll need to add records in between the soft motor and the fanout to convert the absolute position, which is written to the PV in soft motor's OUT field, into a relative displacement. I don't have good suggestions how to implement that.

Kevin


On 11/13/23 16:46, Tran, Phi Dung wrote:
Hi Kevin,

I am using my Soft Channel $(P) to move my three real motors by relative motions. I set the field(RTRY,0) in $(P).  Initially, I set all three real motor positions or xxx.VAL to zero. Next, I caput $(P)  1 for relative motion for the real motors.  All real motors moved to 1+0 from 0 for relative move, xxx.RLV. _However, all subsequent caput $(P) 1 will not cause the real motors to move from 1.  They stayed at 1 instead of 1+1?_

If I set all three real motor positions Xxxx.VAL to zero again.
First caput $(P) 2.  All three real motors moved relatively to 2+0 from 0.
_Second caput $(P) 2.  All three real motors moved relatively to 2.000,2.001,2.002 not 4,4,4._ Third caput $(P) 2.  All three real motors moved relatively to 4.000,4.001,4.002. All subsequent caput $(P) 2, correctly moved the motors to the additional 2 units relative to the current positions.

Please advice.
Thank you,
Phi


References:
second relative motion stuck in a do loop Tran, Phi Dung via Tech-talk
Re: second relative motion stuck in a do loop Kevin Peterson via Tech-talk
Re: second relative motion stuck in a do loop Tran, Phi Dung via Tech-talk
Re: second relative motion stuck in a do loop Kevin Peterson via Tech-talk
Re: second relative motion stuck in a do loop Tran, Phi Dung via Tech-talk

Navigate by Date:
Prev: Re: Sequencer website broken Ben Franksen via Tech-talk
Next: Re: Sequencer website broken Johnson, Andrew N. 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  2022  <20232024 
Navigate by Thread:
Prev: Re: second relative motion stuck in a do loop Tran, Phi Dung via Tech-talk
Next: caget -d DBR_...INT doesn't work Érico Nogueira Rolim 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  2022  <20232024 
ANJ, 14 Nov 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·