Homing and endstops


To apply any config changes make, sure to safely unmount the device and reboot the the device by sending a reset command, or powering the device off and on again


When a home command is received the robot moves to it's home position. This move is not done in a straight line, but instead has a process to limit collision with objects and/or itself

The homing proceedure is as follows:

  • Home Z
  • Home XY
  • Home any axis with endstop linked to it

Example of homing configuration

ragnar_home_x                                  0.0            # ragnar homing position
ragnar_home_y                                  0.0            # "
ragnar_home_z                               -400.0            # "
ragnar_home_theta                              0.0            # "
ragnar_homing_z_rate                         100.0            # z homing rate in mm/sec
ragnar_homing_xy_rate                        100.0            # xy homing rate in mm/sec

Homing position may differ depending on model and usecase

Homing with sensor/endstop

Up to 6 ports can be assigned to work as endstops or limit switches

Example of actuated platform homing

# Endstop config
endstops_enable                              true             # enable homing and endstops
endstop_debounce_count                       100              # endstop noise debounce

# Actuated platform homing
port1_input                                  1.29             # pin for input
port1_on_trigger                             IGNORE           # trigger event IGNORE | HALT
port1_axis                                   T                # axis
port1_direction                              POSITIVE         # direction of homing POSITIVE | NEGATIVE 
port1_home                                   0.0              # position of axis after homing
port1_speed_fast                           180.0              # axis fast speed in units/sec
port1_speed_slow                            18.0              # axis slow speed in units/sec

The homing proceedure for axis with endstop is as follows:

  • Move [PORT]_axis in [PORT]_direction at [PORT]_speed_fast
  • Wait for [PORT]_input to set
  • Move [PORT]_axis off sensor in opposite direction at [PORT]_speed_slow
  • Wait for [PORT]_input to reset
  • Set robot [PORT]_axis position to [PORT]_home
  • Move [PORT]_axis to ragnar_home_theta position

Homing limits and halt

When a halt is triggered all motors will turn off, and switch outputs and states will be reset depending on configuration. Commands are ignored while in a halt state, the state can only be exited by G-Code "M999" or manually reseting the device

This is usefull when something unwanted or harmfull can be detcted by a sensor or switch

Example of hard limit that will cause a software emergency stop

# E-Stop example
port6_input                                  1.24!^           # port 1, pin 24, inverted logic, with pullup resister
port6_on_trigger                             HALT             # trigger event IGNORE | HALT

This configuration is intended for normally open emergency stop connector