Skip to content
Discussion options

You must be logged in to vote

As a start you can hook your (plugin?) code into hal.stepper.pulse_start and send commands to the stepper drivers when a new segment arrives. A new segment is started every ~5ms and the acceleration and feed rate is constant during each.
FYI spindle sync is implemented by swapping hal.stepper.pulse_start between normal and synced mode. Synced mode checks for new segments by comparing the segment id with the previous one so you may get som ideas from that code.

Next step could be adding an additional step interrupt handler to stepper.c, this to reduce overhead. It can be selected at run-time by pointing hal.stepper.interrupt_callback to it.

Disclaimer: I do not know if this is a workable s…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@graykimchi
Comment options

Answer selected by graykimchi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants