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_positioners(fps, axis, positioner_ids, 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.axis (str) – The axis to calibrate, either
"alpha","beta", or"both".positioner_id – The ID of the positioner(s) 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:
CommandIndicates that the transmission for the trajectory has ended.
- Parameters:
- command_id: CommandID = 23
The id of the command.
- broadcastable: bool = False
Whether the command can be broadcast to all robots.
- move_command = True
Whether this command produces a positioner move.
- class jaeger.commands.calibration.StartMotorCalibration(positioner_ids, timeout=None, done_callback=None, n_positioners=None, data=None, ignore_unknown=True)[source]
Bases:
CommandAborts sending a trajectory.
- Parameters:
- command_id: CommandID = 26
The id of the command.
- broadcastable: bool = False
Whether the command can be broadcast to all robots.
- move_command = True
Whether this command produces a positioner move.
- class jaeger.commands.calibration.StartCoggingCalibration(positioner_ids, timeout=None, done_callback=None, n_positioners=None, data=None, ignore_unknown=True)[source]
Bases:
CommandStarts the trajectories.
- Parameters:
- command_id: CommandID = 47
The id of the command.
- broadcastable: bool = False
Whether the command can be broadcast to all robots.
- move_command = True
Whether this command produces a positioner move.
- class jaeger.commands.calibration.SaveInternalCalibration(positioner_ids, timeout=None, done_callback=None, n_positioners=None, data=None, ignore_unknown=True)[source]
Bases:
CommandStop the trajectories.
- Parameters:
- command_id: CommandID = 53
The id of the command.
- broadcastable: bool = False
Whether the command can be broadcast to all robots.
- move_command = False
Whether this command produces a positioner move.
- class jaeger.commands.calibration.HallOn(positioner_ids, timeout=None, done_callback=None, n_positioners=None, data=None, ignore_unknown=True)[source]
Bases:
CommandTurns hall sensors ON.
- Parameters:
- command_id: CommandID = 116
The id of the command.
- broadcastable: bool = False
Whether the command can be broadcast to all robots.
- move_command = False
Whether this command produces a positioner move.
- safe = True
Whether it’s safe to execute this command when the FPS is locked.
- class jaeger.commands.calibration.HallOff(positioner_ids, timeout=None, done_callback=None, n_positioners=None, data=None, ignore_unknown=True)[source]
Bases:
CommandTurns hall sensors ON.
- Parameters:
- command_id: CommandID = 117
The id of the command.
- broadcastable: bool = False
Whether the command can be broadcast to all robots.
- move_command = False
Whether this command produces a positioner move.
- safe = True
Whether it’s safe to execute this command when the FPS is locked.