On 29 Mar 2022, at 16:06, Bernhard.Kuner via Tech-talk <tech-talk at aps.anl.gov> wrote:
Hallo Kevin,
thank You for the help to understand what happens in the motorRecord,
nasty beast this record!
The homing type is here on the positive end-switch "Mn.m+". Poll period
0.5s but ACCL=2.0
There was a bug in the phyMotion software if you use the positive
end-switch, but there is an update from phytron and now it works if you
give this command by the phyLogic software.
Ok, You say the record recognises a motor action to be done by
pC_->motorStatusDone_ This is set in the poll routine by the command
"Mn.m==H". In the log you can see that there is no "M1.1==H" with the
answer "E" for done after hitting the end-switch and before the new move
comand occurs. So we suppose a problem in the record.
I think that there may be a potential problem in the motorRecord itself.
The first one is that the record assumes that a motor is “done”,
when a limit switch is hit:
<https://github.com/epics-modules/motor/blob/master/motorApp/MotorSrc/motorRecord.cc#L3707>
While this may be true for some controllers, it is not, especially for modern controllers
that have a “homing sequence” which looks like
“hit the limit switch, once activated, revert and drive slowly until the switch is released”
I don’t have a Phytron to test this.
If you have time to modify the motorRecord itself and test, you can modify line 3707
from above.
By the way, we have a support for the phytron IO modules. There I
introduced support for stringout -in Record to communicate with the
motor controller. If you send a home command this way, it works as expected.
Bernhard
________________________________
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.
Aufsichtsrat: Vorsitzender Dr. Volkmar Dietz, stv. Vorsitzende Dr. Jutta Koch-Unterseher
Geschäftsführung: Prof. Dr. Bernd Rech, Thomas Frederking
Sitz Berlin, AG Charlottenburg, 89 HRB 5583
Postadresse:
Hahn-Meitner-Platz 1
14109 Berlin
Deutschland