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.
Note: You arrive here because neither the controller nor the internal registers are
within the limits. This is an odd situtation. Before you execute the below mentioned
steps, you should open the limits. Otherwise the cmr-logic mentioned above interfers
with your actions.
User action (executed on the Tango server 'Test device', NOT ATK panel):
- If the motor position is somehow known, write it down.
You are safe. After you resolved the register
discrepancies, see below, you can calibrate the motor, if necessary.
If the position is not known, you may inspect the files in the directory /online_dir/MotorLogs.
You may also inspect the versions of /online_dir/ipython_log.py (or /online_dir/motor_positions.bck, online.log)
- Write down StepPositionController, this is the value from the hardware, and StepPositionInternal, this
is the value maintained in the server.
- Btw.: The Position exported by the Tango server corresponds to the controller value.
- You have to decide now, whether the controller or the internal value is correct.
Before you can use the command SetStepPosition to set both registern to the correct value,
you have to make both registers identical.
This is done by setting StepPositionInternal to the value contained in StepPositionController (or the other way around).
Then the command SetStepPosition can be executed.
- Btw.: The command SetStepPosition changes the controller and internal registers leaving
the calibration constant UnitCalibration as it is. Therefore the Position changes accordingly.
- Btw.: The command SetStepRegister changes the controller and internal registers leaving
the Position as it is. Therefore the calibration constant UnitCalibration is changed.
- Check the limits. Reset them to some useful values.
Cmr() sends some log messages to stderr, which can be
inspected by Astor.