Positioner calibration¶
Positioners are shipped calibrated but it’s possible that the calibration needs to be redone over their lifetime. The calibration procedure runs through the motor, datums, and cogging calibrations, and then saves the configuration to the positioner EPROM.
Performing calibration on a positioner¶
The calibration steps can be commanded independently while in normal mode (no bootloader):
Motor calibration: command
StartMotorCalibration
. Wait untilDISPLACEMENT_COMPLETED
,MOTOR_ALPHA_CALIBRATED
, andMOTOR_BETA_CALIBRATED
are set.Datums calibration: command
StartDatumCalibration
. Wait untilDISPLACEMENT_COMPLETED
,DATUM_ALPHA_CALIBRATED
, andDATUM_BETA_CALIBRATED
are set.Cogging torque calibration: command
StartCoggingCalibration
. Wait untilCOGGING_ALPHA_CALIBRATED
andCOGGING_BETA_CALIBRATED
are set. This step can take 20+ minutes.Save calibration: command
SaveInternalCalibration
.
Normally the calibration is done using the calibrate_positioner
coroutine. For example
>>> from jaeger import FPS
>>> from jaeger.commands import calibrate_positioner
>>> fps = await FPS().initialise()
>>> calibrate_positioner(fps, 31)
This can be conveniently run from the command line as
$ jaeger calibrate 31
API¶
- async jaeger.commands.calibration.calibrate_positioner(fps, positioner_id, motors=True, datums=True, cogging=True)[source]
Runs the calibration process and saves it to the internal memory.
- Parameters
fps (FPS) – The instance of
FPS
that will receive the trajectory.positioner_id (int) – The ID of the positioner to calibrate.
motors (bool) – Whether to perform the motor calibration.
datums (bool) – Whether to perform the datums calibration.
cogging (bool) – Whether to perform the cogging calibration (may take more than one hour).
- Raises
JaegerError – If encounters a problem during the process.
Examples
>>> fps = FPS() >>> await fps.initialise() # Calibrate positioner 31. >>> await calibrate_positioner(fps, 31)
- class jaeger.commands.calibration.StartDatumCalibration(positioner_ids, timeout=None, done_callback=None, n_positioners=None, data=None, ignore_unknown=True)[source]
Bases:
jaeger.commands.base.Command
Indicates that the transmission for the trajectory has ended.
- class jaeger.commands.calibration.StartMotorCalibration(positioner_ids, timeout=None, done_callback=None, n_positioners=None, data=None, ignore_unknown=True)[source]
Bases:
jaeger.commands.base.Command
Aborts sending a trajectory.
- class jaeger.commands.calibration.StartCoggingCalibration(positioner_ids, timeout=None, done_callback=None, n_positioners=None, data=None, ignore_unknown=True)[source]
Bases:
jaeger.commands.base.Command
Starts the trajectories.
- class jaeger.commands.calibration.SaveInternalCalibration(positioner_ids, timeout=None, done_callback=None, n_positioners=None, data=None, ignore_unknown=True)[source]
Bases:
jaeger.commands.base.Command
Stop the trajectories.
- class jaeger.commands.calibration.HallOn(positioner_ids, timeout=None, done_callback=None, n_positioners=None, data=None, ignore_unknown=True)[source]
Bases:
jaeger.commands.base.Command
Turns hall sensors ON.
- class jaeger.commands.calibration.HallOff(positioner_ids, timeout=None, done_callback=None, n_positioners=None, data=None, ignore_unknown=True)[source]
Bases:
jaeger.commands.base.Command
Turns hall sensors ON.