Misfittech / nano_stepper

Stepper feedback controller
423 stars 179 forks source link

Limit Detection #20

Closed adamfilip closed 4 years ago

adamfilip commented 6 years ago

Is Limit detection possible. so endstops not required?

davidrisberg commented 6 years ago

I haven't looked in to this yet, but I plan to try connecting the error output of the NZS to a the limit pin of my control system. I'm assuming that the error pin can be configured to signal at a specific number of missing steps, so if you reach a mechanical stop and try to keep going at a slow rate it should perform consistently for both homing and hard limit detection. If it's not already an option it should be very easy to implement. Although it would put a lot of strain on your machine, so it must be constructed to withstand this. You may want to tune the max current setting also.

coolio986 commented 4 years ago

The latest firmware has this.

#ifndef PIN_ENABLE
CMD_STR(errorpinmode,"gets/sets the functionality of the error/enable pin");
#else
CMD_STR(enablepinmode,"gets/sets the functionality of the enable pin");
#endif

CMD_STR(errorlimit, "gets/set the error limit which will assert error pin (when error pin is set for error output)");