Programmable 'stop' during jogging.....

Moderators: TomKerekes, dynomotion

SamMarrocco
Posts: 85
Joined: Fri Apr 27, 2018 12:44 pm

Re: Programmable 'stop' during jogging.....

Post by SamMarrocco » Mon Mar 04, 2024 3:24 pm

Tom,
Watching the green "thread running" indicators in KMotion pointed me in the correct direction to find the bug (which was mine).
At first, it appeared that adjustsoftlimits would run in thread 7, then quit abruptly. The code would run fine if I downloaded it to any other thread. So I tested in in KMotion directly and it was fine in Thread 7 as well. This lead me to an dark corner of my app's code where I apparently has run a short piece of test code in thread 7 later, which was causing the adjustsoftlimits code that was already running to quit.

Thanks for the help on this; the green 'thread running' indicators are invaluable for this, and I'm going to implement those into my app for future troubleshooting. I haven't had much luck trying them in the vb.net code in the past; something to do with the lock/tokens and threading that I never got back to completing.

The adjustsoftlimits c code is now working better, but it still doesn't stop exactly on the soft limit value. While minor for me, it always seems to stop approximately .0001 to .0003 past the soft limit value. Is this to be expected behavior? Jogging slowly or quickly (1-6 Inches per second) doesn't seem to make any difference.

User avatar
TomKerekes
Posts: 2546
Joined: Mon Dec 04, 2017 1:49 am

Re: Programmable 'stop' during jogging.....

Post by TomKerekes » Tue Mar 05, 2024 2:39 am

Hi Sam,
The adjustsoftlimits c code is now working better, but it still doesn't stop exactly on the soft limit value. While minor for me, it always seems to stop approximately .0001 to .0003 past the soft limit value. Is this to be expected behavior? Jogging slowly or quickly (1-6 Inches per second) doesn't seem to make any difference.
I think that is normal. Probably caused by the 180us Time Slice and calculation time. The idea normally is to not loose significant travel to allow for stopping distance. 0.0003inches should not be significant.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply