The actions described in this section are supported by
the EncoderAttribute widget of the SardanaMotorMenu.py.
During closed loop operation the motor controller card minimizes the difference
between encoder reading and step position.
- If the homing procedure can be executed:
if possible, execute the homing procedure as described in Help-Homing.
Note: The home flag is cleared when the Tango server is re-started.
- If the homing procedure cannot be executed:
- Press the 'Set FlagEncoderHomed'. This is possible without
loosing accuracy, as long as the VME stayed powered after the last homing procedure.
- Press 'Cali Enc.' to calibrate the encoder position to the motor position.
- Press 'AlignRegAndEncs' to make the step position consistent with the encoder reading.
Generally this changes the UnitCalibration. It does not change the position.
SardanaMotorMenu.py: The widget displays a quantity Enc*ER=. The value
should be close to the step register.
'Close' means within DeadBand*EncoderRatio.
Warning: a calibration (which can only be done in open-loop mode) changes the
UnitCalibration of the motor creating a difference to the home position
of the encoder. In this case the user has to CaliEnc and AlignWithEnc again.
The same applies to reset-motor-step-position commands.
- set the value of CorrectionGain [1,32000], e.g.: 100 (Encoder widget)
OmsMaxV manual (HG - stepper hold gain): "The parameter should be set experimentally
by increasing it until the system
is unstable then reducing it slightly below the threshold of stability. Factory default: 1"
"Stability" can be sensed by listening to the motor or by watching the motor position.
If the position keeps jumping forth and back, although the target position has been
reached, the motor is unstable.
If the value is too low, the motor needs a long time to reach the target position.
- set the DeadBand, e.g.: 2
OmsMaxV manual on HD (stepper hold deadband): "If the encoder count is within this distance
of target, it is considered in
position and no further correction will be made."
- set SlewRateCorrection, must be non-zero, the maximum is the motor slew rate
The maximum velocity to be used during position correction.
- move the motor to ensure that the encoder position and the
motor postion are more or less identical.
- set SlipTolerance. In closed loop mode movements have to terminate,
if the axis slips.
Otherwise the motor moves into the limit switch, if it looses
the encoder signal. In case SlitTolarance is too low, every movement
is interrupted by the slip condition. If it is much too low, esp. below
the DeadBand, the slip condition is detected also when the motor stands
still. The SlitTolerance is written to the hardware when the loop
is closed. Typical values 100 (but also 1000).
- if the encoder counts and the steps have the same direction,
you may close the loop now. Whether or not the steps and the encoder
counts have the same direction can be checked by moving the motor.
Compare StepPositionController and Encoder PositionEncoderRaw.
- if steps and encoder counts have the opposite direction:
- set the FlagInvertEncoderDirection to 1.
- change the sign of the encoder conversion.
- move the motor to ensure that the position and the encoder
position are more or less identical.
- close the loop.
- the closed loop is active after the next move.
- Consider to set FlagUseIp to 1: This replaces ID at the end of the move
command by IP. The IP option is crucial for cases where the relation between
motor registers and encoder position is not strictly linear.
From the Oms docu: The IP command operates like the ID command except
the interrupt is deferred until the stage is within the specified encoder hold
dead-band set by the HD command.
- closed loop operation needs to be enabled after the server was re-started