Soft Limit Overshooting
Posted: Sun Dec 26, 2021 11:51 pm
Since I've been using my little milling machine quite a bit lately, I'm working through the to do/finish list.
One thing that's causing me problems, is soft limits.
If I jog the Y-axis using the MPG (I'm using MPGServiceSmoothHardwareEncFiltered.c ), I can physically see that it overshoots the soft limit, then moves back to the soft limit (using AdjustSoftLimits.c).
In the positive direction, this can result in the physical limit switch being hit. I've obviously been a bit more conservative in the negative direction, as there is enough travel for the axis to bounce without hitting the limit switch.
I say Y-axis, as that's the axis it's most notable on for some reason, despite Vel,Acc, and Jerk being identical on all axis.
I do have my Init written so only once axis gets serviced per time slice.
Could it be I need to increase the CALC_TIME_CLICKS value in AdjustSoftLimits?
I would have thought the default 2ms was a long enough period, given there is only one active thread.
One thing that's causing me problems, is soft limits.
If I jog the Y-axis using the MPG (I'm using MPGServiceSmoothHardwareEncFiltered.c ), I can physically see that it overshoots the soft limit, then moves back to the soft limit (using AdjustSoftLimits.c).
In the positive direction, this can result in the physical limit switch being hit. I've obviously been a bit more conservative in the negative direction, as there is enough travel for the axis to bounce without hitting the limit switch.
I say Y-axis, as that's the axis it's most notable on for some reason, despite Vel,Acc, and Jerk being identical on all axis.
I do have my Init written so only once axis gets serviced per time slice.
Could it be I need to increase the CALC_TIME_CLICKS value in AdjustSoftLimits?
I would have thought the default 2ms was a long enough period, given there is only one active thread.