Determining if axis has been enabled

Moderators: TomKerekes, dynomotion

Post Reply
larryjamessmith
Posts: 25
Joined: Mon Dec 23, 2019 9:18 pm

Determining if axis has been enabled

Post by larryjamessmith » Fri Dec 16, 2022 2:35 am

I have a problem in KMotion which I hope has a simple answer but is driving me crazy. I have a need in a C program to determine if an axis is already enabled before proceeding. I see a console command "Enabled<N>" which works fine in the console, but I cannot find any C functions to do the same thing. I am surprised since I have generally been able to find a C function equivalent to pretty much all the Console commands. Any suggestions?

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

Re: Determining if axis has been enabled

Post by TomKerekes » Fri Dec 16, 2022 2:43 am

Hi Larry,

You should be able to check:

if (chx->Enable) ...

where x is the axis of interest.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

larryjamessmith
Posts: 25
Joined: Mon Dec 23, 2019 9:18 pm

Re: Determining if axis has been enabled

Post by larryjamessmith » Fri Dec 16, 2022 3:11 am

Tom,
Thank you so much. I will try that as soon as I can. So, I assume that the Enable value is the one within the CHAN structure defined in KMotionDef.h? That makes sense now that I am studying that structure for other useful status...

I am amazed at the promptness of your reply to my question. I love your product and am building my second CNC mill using it. This one I built with an automatic tool changer and I am making a big effort to handle all exceptions and errors in an intelligent fashion. On my first mill every error required me to restart rather than resume actions...

Thanks again,
Larry

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

Re: Determining if axis has been enabled

Post by TomKerekes » Fri Dec 16, 2022 6:17 pm

Hi Larry,

That is correct. Thanks for the kind words. Consider leaving a review.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply