At various places the OmsVme58 Tango server ensures the
validity of the step position by comparing the internal (software)
values and the controller registers. If the internal and controller
registers deviate, the following sequence of conditions are tested:
- If the controller is 0 and within the step limits, the controller is loaded
with the internal value. This is the power-up scenario.
- If the controller is non-zero but deviates from the internal value by shift-right-by-3bits,
the internal value is loaded to the controller.
This is a workaround for the hardware bug that the position registers are changed by the first homing
after re-powering VME.
- If the controller is non-zero and inside limits, the internal value is overwritten by the controller value.
We trust the
controllers because they should keep track of the motor position.
- If the internal values is non-zero and inside limits, the internal values
are loaded into the controller.
- Otherwise the disagreement is not resolved.
Cmr() sends some log messages to stderr, which can be
inspected by Astor.