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: "Tran, Phi Dung via Tech-talk" <tech-talk at aps.anl.gov>
To: Kevin Peterson <kmpeters at anl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 13 Nov 2023 22:46:39 +0000
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



From: Kevin Peterson <kmpeters at anl.gov>
Sent: Thursday, November 9, 2023 5:29 PM
To: Tran, Phi Dung <ptran1 at bnl.gov>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: second relative motion stuck in a do loop
 
Phi,

I see a number of problems with the database:

1. The SCAN field of the $(P) motor should be "Passive", not "PASSIVE"
-- this causes an error but is not the source of the problem.

2. The $(P) motor isn't setting RTRY, so the number of retries is
defaulting to 10.  If you set RTRY to 0, the outboard, inboard, and
downstream motors will only be moved once, instead of what appears to be
in a loop.

3. The $(P) motor's OUT field is writing the motor's TARGET position to
the $(P)-F fanout, but the $(P)-F fanout is writing to the output,
inboard, and downstream motor's RLV field, but it should be outputting
to their VAL fields.

If all the motors are at zero and the virtual motor does a relative move
of any distance, the move should complete successfully because an
absolute move and a relative move are the same, when starting from zero.

If the real motors have non-zero positions, requesting a 1mm relative
move of the virtual motor, commands a relative move of the real motors
with a magnitude of 1mm plus the virtual motor's current position.

If the virtual motor has a non-zero number of retries, the motor record
does a retry at the end of the move because the readback position of the
virtual motor doesn't match the desired target position.

Kevin

On 11/9/23 12:58, Tran, Phi Dung wrote:
> Hi Kevin,
>
> Here is the result.
> If I caput my virtual motor $(P) by 1 then $(P)-F will fanout to my
> three real motors.  The three motors move by 1 and their X.Mtr.VAL is at
> 1.  If I repeat caput by 1 many times to my virtual motor, the three
> real motor VAL remains at 1.
>
> However when I caput 2 to my virtual motor, the three motors moved to
> 20.1 mm.
>
> Here is the output,
>
> [ptran1@xf19id2-ws3 ~]$ caput XF:19IDC-ES-G0{Ymove}Mtr.TPRO 1
>
> Old : XF:19IDC-ES-G0{Ymove}Mtr.TPRO0
>
> New : XF:19IDC-ES-G0{Ymove}Mtr.TPRO1
>
> [ptran1@xf19id2-ws3 ~]$ caput XF:19IDC-ES-G0{Ymove}Mtr-F.TPRO 1
>
> Old : XF:19IDC-ES-G0{Ymove}Mtr-F.TPRO 0
>
> New : XF:19IDC-ES-G0{Ymove}Mtr-F.TPRO 1
>
> _Input 1, caput XF:19IDC-ES-G0{Ymove}Mtr 1, all three real motors moved
> to 1_
>
> ca:ptran1 at xf19id2-ws3.nsls2.bnl.local: dbProcess of
> 'XF:19IDC-ES-G0{Ymove}Mtr'
>
> ca:ptran1 at xf19id2-ws3.nsls2.bnl.local: dbProcess of
> 'XF:19IDC-ES-G0{Ymove}Mtr-F'
>
> CAC-event: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr'
>
> …. Multiple repeat of CAC-event: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr'
>
> ….
>
> scanOnce: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr-DMOV'
>
> CAC-event: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr'
>
> scanOnce: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr-DMOV'
>
> CAC-event: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr'
>
> scanOnce: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr-DMOV'
>
> CAC-event: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr'
>
> CAC-event: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr'
>
> _Input2, caput XF:19IDC-ES-G0{Ymove}Mtr 1, all 3 real motors previously
> at 1, they remained at 1 and all_
>
> _Subsequent input of 1 will not move the 3 real motors and only
> dbProcess is shown._
>
> ca:ptran1 at xf19id2-ws3.nsls2.bnl.local: dbProcess of
> 'XF:19IDC-ES-G0{Ymove}Mtr'
>
> _Input3, caput XF:19IDC-ES-G0{Ymove}Mtr 1, all 3 real motors previously
> at 1, they remained at 1 and all_
>
> _Subsequent input of 1 will not move the 3 real motors and only
> dbProcess is shown._
>
> ca:ptran1 at xf19id2-ws3.nsls2.bnl.local: dbProcess of
> 'XF:19IDC-ES-G0{Ymove}Mtr'
>
> _Input4, caput XF:19IDC-ES-G0{Ymove}Mtr 2, all 3 real motors previously
> at 1, they moved to 20.1_
>
> _ca:ptran1 at xf19id2-ws3.nsls2.bnl.local: dbProcess of
> 'XF:19IDC-ES-G0{Ymove}Mtr'_
>
> _ca:ptran1 at xf19id2-ws3.nsls2.bnl.local: dbProcess of
> 'XF:19IDC-ES-G0{Ymove}Mtr-F'_
>
> _scanOnce: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr-DMOV'_
>
> _scanOnce: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr-DMOV'_
>
> _scanOnce: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr-DMOV'_
>
> _CAC-event: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr'_
>
> _…._
>
> _CAC-event: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr'_
>
> _scanOnce: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr-DMOV'_
>
> _CAC-event: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr'_
>
> _scanOnce: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr-DMOV'_
>
> _CAC-event: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr'_
>
> _scanOnce: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr-DMOV'_
>
> _CAC-event: dbProcess of 'XF:19IDC-ES-G0{Ymove}Mtr'_
>
> Thanks,
> Phi
> ------------------------------------------------------------------------
> *From:* Kevin Peterson <kmpeters at anl.gov>
> *Sent:* Thursday, November 9, 2023 11:04 AM
> *To:* Tran, Phi Dung <ptran1 at bnl.gov>; tech-talk at aps.anl.gov
> <tech-talk at aps.anl.gov>
> *Subject:* Re: second relative motion stuck in a do loop
> Phi,
>
> Are any of the motors (real or soft) doing retries?
>
> How does the $(P)-DMOV record's behavior differ between the 1st relative
> move, which succeeds, and the 2nd relative move, which misbehaves?
>
> Kevin
>
> On 11/7/23 22:23, Tran, Phi Dung via Tech-talk wrote:
>> Hi,
>>
>> I am using RLV for relative motion with a soft channel. When I issue a
>> caput command with a value of 2 to my soft channel, $(P), to move the
>> other real motors, they move by 2 mm. However, when I repeat the caput
>> command with the value 2 to my soft channel for the second time, the
>> motors move by 7*2=14 mm instead of 2 mm. Please advise.
>>
>> Thank you,
>> Phi
>>

Replies:
Re: second relative motion stuck in a do loop Kevin Peterson via Tech-talk
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

Navigate by Date:
Prev: Re: Room temperature and humidity monitoring with EPICS? J. Lewis Muir via Tech-talk
Next: Re: Sequencer website broken Ben Franksen 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 Kevin Peterson via Tech-talk
Next: Re: second relative motion stuck in a do loop Kevin Peterson 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 ·