KMotion freezing when trying to download C program

Moderators: TomKerekes, dynomotion

Post Reply
amowry
Posts: 41
Joined: Fri Jan 26, 2018 1:00 am

KMotion freezing when trying to download C program

Post by amowry » Tue Jun 30, 2020 7:36 pm

I'm trying to download a C program in the C Program Screen in KMotion, and the application freezes. Any thoughts on why this would happen? There is already a program flashed to the same thread, but I assume that shouldn't matter, is that correct? It's on my K2CNC-- I'm trying to make a minor change to K2's main driver program and reflash to the same thread after testing it.

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

Re: KMotion freezing when trying to download C program

Post by TomKerekes » Tue Jun 30, 2020 8:07 pm

Hi amory,

I think K2CNC enabled a UserCallback. This causes KFLOP to continuously call the specified function every 90us regardless of whether the Thread containg the function is scheduled for execution or not. If you change the code in the Thread Space while the code is being called it will likely cause a crash. You must stop the callback first. Run StopCallback.c in a Thread other than the Thread containing the callback function first.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

amowry
Posts: 41
Joined: Fri Jan 26, 2018 1:00 am

Re: KMotion freezing when trying to download C program

Post by amowry » Tue Jun 30, 2020 8:19 pm

That did the trick, thanks Tom!

Post Reply