about c program

Moderators: TomKerekes, dynomotion

Post Reply
irmad
Posts: 47
Joined: Sun Jun 07, 2020 1:39 pm

about c program

Post by irmad » Sun Sep 27, 2020 3:19 am

CS0_StoppingState, what does that mean?
can anyone tell me, what is its use.

and does anyone know, how to show DRO way in C program?

below is an example that I use on the Arduino GRBL :

Code: Select all

int count = 0;
if ( count > 10 )
{
   // activate relay 1
   // deactivate relay 2
}
can anyone show me, how to make count in C program? especially at KANALOG Dynomotion.

please advise and help.

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

Re: about c program

Post by TomKerekes » Sun Sep 27, 2020 4:15 pm

Hi irmad,
CS0_StoppingState, what does that mean?
can anyone tell me, what is its use.
You can find descriptions of Variables in KMotionDef.h. Or you can search the examples. This variable can be used to tell you if a Feed Hold is in Progress. 0 if not in feed hold and > 1 if stopping or stopped. Here is the definition:

Code: Select all

extern int CS0_StoppingState; 			// emergency stop in progress, 0 = not stopping, 1=stopping coord motion, 2=stopping indep, 3=fully stopped, 4=ind stopped
and does anyone know, how to show DRO way in C program?
I don't understand the question. You can call GetDROs() to obtain the DRO values from KMotionCNC. See SetFixtureZ.c for an example.

below is an example that I use on the Arduino GRBL :
Only 5 lines of code that don't do anything are shown. Did you paste it correctly?
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply