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:
[email protected]: dbProcess of
> 'XF:19IDC-ES-G0{Ymove}Mtr'
>
> ca:
[email protected]: 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:
[email protected]: 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:
[email protected]: 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:
[email protected]: dbProcess of
> 'XF:19IDC-ES-G0{Ymove}Mtr'_
>
> _ca:
[email protected]: 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 <
[email protected]>
> *Sent:* Thursday, November 9, 2023 11:04 AM
> *To:* Tran, Phi Dung <
[email protected]>;
[email protected]
> <
[email protected]>
> *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
>>