Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record: motor record DLY and STOP problem #60

Conversation

tboegi
Copy link
Contributor

@tboegi tboegi commented Mar 9, 2017

Fix the problem that the record gets stuck when STOP is
pressed while the record is in MIP_DELAY (and the motor
is standing still, so that there is no record processing).

Currently the MIP_DELAY bits are set to 0, when a STOP is issued.
As the motor already hase stopped, the DMOV field never goes to 1.
There are 2 possible solutions here:
a) STOP wins:
pmr->dmov = FALSE;
MARK(M_DMOV);

b) DELAY wins
Send a STOP to the controller (just to be sure), but wait for the DELAY.

a) may cause probles later, whena new positionioning is done after the STOP
and a new DELAY is triggered.
As the old callback is still active, it may be executed before the new
callback. And the time will be too short.
For this reason go with b)

http://www.aps.anl.gov/epics/tech-talk/2015/msg01786.php

Fix the problem that the record gets stuck when STOP is
pressed while the record is in MIP_DELAY (and the motor
is standing still, so that there is no record processing).

Currently the MIP_DELAY bits are set to 0, when a STOP is issued.
As the motor already hase stopped, the DMOV field never goes to 1.
There are 2 possible solutions here:
a) STOP wins:
  pmr->dmov = FALSE;
  MARK(M_DMOV);

b) DELAY wins
  Send a STOP to the controller (just to be sure), but wait for the DELAY.

a) may cause probles later, whena new positionioning is done after the STOP
and a new DELAY is triggered.
As the old callback is still active, it may be executed before the new
callback. And the time will be too short.
For this reason go with b)

http://www.aps.anl.gov/epics/tech-talk/2015/msg01786.php
@keenanlang keenanlang added the bug label Apr 26, 2017
@kmpeters
Copy link
Member

This seems like a reasonable change. If @rsluiter concurs, I'll merge the pull request.

@kmpeters kmpeters requested a review from rsluiter April 27, 2018 16:07
@rsluiter
Copy link
Contributor

Confirmed the behaviour and the fix. Good to go.

@kmpeters kmpeters merged commit 90bb52f into epics-modules:master May 1, 2018
@kmpeters kmpeters added this to the R6-10-1 milestone May 2, 2018
kmpeters added a commit that referenced this pull request Jun 6, 2018
…P-problem

Record: motor record DLY and STOP problem
(cherry picked from commit 90bb52f)
@tboegi tboegi deleted the record-DLYandSTOP-problem branch July 5, 2018 10:48
tboegi added a commit to EuropeanSpallationSource/motor that referenced this pull request Oct 2, 2018
Merge up to 90bb52f: "Merge: f3d4e0f 38186d0"
Merge pull request epics-modules#60 from EuropeanSpallationSource/record-DLYandSTOP-problem

The code in motorRecord.cc is already there, but uses devSupStop() instead of
hand-made INIT_MSG(), WRITE_MSG() and SEND_MSG().
And that is why we have:
Conflicts:
    motorApp/MotorSrc/motorRecord.cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants