Hej Lorenz,
>I've been working on an asyn motor controller with DeferredMoves.
good to hear.
>This in principle works, however I noticed that when DeferedMoves is enabled,
>and I change the setpoint of an axis, the moving flag is raised for a short time (i.e. DMOV=0),
>even though the axis is not moving yet.
Hm. There are 2 different instances involved here:
the motorRecord (as a record, doing its statemachine business)
and the (model 3) driver handling defered moves.
The record is educated to aloways have a DMOV == false -> DMOV == true -> DMOV transition,
when you write to the .VAL field of the record.
This is to help scripts relying on a callback.
If an automated script generates a new setpoint, and the setpoint is the same as the old one,
or very close to the old one, the motor will not (need to) move.
however, the script gets a callback, as expected.
The deferred moves are generated in the driver, and you talk to another record, right ?
So that the motorRecord has no idea about the deferred status.
>I would like to get rid of this behavior.
That is understandable.
The only solution I can think of spontaneously would be to move the "deferred feature" into the
motorRecord itself.
Not impossible, but needs some/much thinking and testing.
how big is the pain-level at your side?
Greetings to Berlin
/Torsten
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Laurenz Rettig via Tech-talk <tech-talk at aps.anl.gov>
Reply-To: Laurenz Rettig <rettig at fhi-berlin.mpg.de>
Date: Friday, 10 March 2023 at 17:17
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Subject: DeferredMoves without setting moving flag
Hi,
I've been working on an asyn motor controller with DeferredMoves. This in principle works, however I noticed that when DeferedMoves is enabled, and I change the setpoint of an axis, the moving flag is raised for a short time (i.e. DMOV=0), even though the
axis is not moving yet. I would like to get rid of this behavior.
As far as I understand it, this is probably induced by the calls to "pAxis->setIntegerParam(motorStatusDone_,
0);" here:
https://github.com/epics-modules/motor/blob/34474ed958838ea5083f598fa4bd9f1ca7e1821c/motorApp/MotorSrc/asynMotorController.cpp#L317
and the flag is reset by the next call of the axis poll() function.
Is there a simple way to avoid this, or do I have to rewrite the whole
writeFloat64 function in my controller driver, and remove these lines?
Thanks,
Laurenz
--
Dr. Laurenz Rettig rettig at fhi-berlin.mpg.de
Emmy Noether Research Group Dynamics of Correlated Materials
Fritz Haber Institute of the Max Planck Society
Department of Physical Chemistry
Faradayweg 4-6 Tel: +49 30 8413 5225
14195 Berlin, Germany Fax: +49 30 8413-5387