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_CALIBRATEDare set.Datums calibration: command
StartDatumCalibration. Wait untilDISPLACEMENT_COMPLETED,DATUM_ALPHA_CALIBRATED, andDATUM_BETA_CALIBRATEDare set.Cogging torque calibration: command
StartCoggingCalibration. Wait untilCOGGING_ALPHA_CALIBRATEDandCOGGING_BETA_CALIBRATEDare 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
FPSthat 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_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source] Bases:
jaeger.commands.base.CommandIndicates that the transmission for the trajectory has ended.
-
class
jaeger.commands.calibration.StartMotorCalibration(positioner_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source] Bases:
jaeger.commands.base.CommandAborts sending a trajectory.
-
class
jaeger.commands.calibration.StartCoggingCalibration(positioner_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source] Bases:
jaeger.commands.base.CommandStarts the trajectories.
-
class
jaeger.commands.calibration.SaveInternalCalibration(positioner_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source] Bases:
jaeger.commands.base.CommandStop the trajectories.
-
class
jaeger.commands.calibration.GetOffset(positioner_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source] Bases:
jaeger.commands.base.CommandGets the motor offsets.
-
get_offsets()[source] Returns the alpha and beta offsets, in degrees.
- Raises
ValueError – If no reply has been received or the data cannot be parsed.
-
-
class
jaeger.commands.calibration.SetOffsets(alpha=0, beta=0, **kwargs)[source] Bases:
jaeger.commands.base.CommandSets the motor offsets.
-
class
jaeger.commands.calibration.HallOn(positioner_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source] Bases:
jaeger.commands.base.CommandTurns hall sensors ON.
-
class
jaeger.commands.calibration.HallOff(positioner_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source] Bases:
jaeger.commands.base.CommandTurns hall sensors ON.