grblHAL / core

grblHAL core code and master Wiki
Other
326 stars 85 forks source link

Homing by Z-pulse of servo #290

Closed karoria closed 5 months ago

karoria commented 1 year ago

Hi Terje, I want to accurately home using Z-pulse of servo/easyservo drive. I also have hard limit switches for homing but want to explore homing like "First seek to limit switch and then slowly feed till Z-pulse signal received from drive. I know, I have to use 2 inputs for each axis in this case, but an example code or exact location where I need to modify code will be a great help. Thanks, Ravi

terjeio commented 1 year ago

There is no need to change any code. Trap hal.homing.get_feedrate in a plugin and switch inputs based on the mode parameter by replacing the hal.homing.get_state function.

karoria commented 1 year ago

There is no need to change any code. Trap hal.homing.get_feedrate in a plugin and switch inputs based on the mode parameter by replacing the hal.homing.get_state function.

Does this mean, I have to write a new plugin? or should I edit machine_limits.h directly?

terjeio commented 1 year ago

Plugin code is your best option - modifying the core means that you have to update it for new releases.