Skip to content

Tool Reference

Available Tools

ToolDescription
positioner_statusGet current position and state
positioner_moveMove to absolute theta/phi position
positioner_homeRun sensorless homing
positioner_stopEmergency stop all motors
positioner_configGet/set motion parameters

positioner_status

Returns the current state of the positioner.

Response fields:

  • theta_deg: Current polar angle (0-180°)
  • phi_deg: Current azimuth angle (0-360°)
  • moving: True if motors are currently moving
  • homed: True if homing has been completed

Example:

{
"theta_deg": 45.0,
"phi_deg": 90.0,
"moving": false,
"homed": true
}

positioner_move

Move to an absolute theta/phi position.

Parameters:

ParameterTypeDefaultDescription
theta_degfloatrequiredTarget polar angle (0-180°)
phi_degfloatrequiredTarget azimuth angle (0-360°)
waitbooltrueWait for move to complete
poll_interval_msint100Status polling interval

Example:

positioner_move(theta_deg=90, phi_deg=45, wait=true)

positioner_home

Run sensorless StallGuard homing on one or both axes.

Parameters:

ParameterTypeDefaultDescription
axisstring"both"Which axis: "theta", "phi", or "both"

How it works:

  1. Motors move slowly in the negative direction
  2. TMC2209 detects stall when motor hits mechanical stop
  3. Position counter is zeroed
  4. Motor backs off slightly from the stop

Example:

positioner_home(axis="both")

positioner_stop

Emergency stop all motors immediately.

Parameters: None

Example:

positioner_stop()

positioner_config

Get or set motion parameters.

Parameters (all optional):

ParameterTypeRangeDescription
speedfloat100-5000Max speed (steps/sec)
accelfloat100-3000Acceleration (steps/sec²)
microsteppingint1-256Microstep divisor

Get current config:

positioner_config()

Set parameters:

positioner_config(speed=2000, accel=1000, microstepping=16)

Tuning guide:

Use CaseSpeedAccelNotes
Fast survey30002000More vibration, use longer settle time
Precision1000500Smoother, less overshoot
Heavy antenna500300Prevents missed steps

Example Workflow

# Home first
positioner_home(axis="both")
# Move to measurement position
positioner_move(theta_deg=90, phi_deg=0, wait=true)
# Check position
positioner_status()