Page 1 of 1

Label from C program

Posted: Fri Mar 22, 2024 7:42 pm
by Tarasevih
Hi Tom.
Is it possible to output a variable from a C program to a label on the KmotionCNC screen?
Can you give an example?
And the second question.
Is it possible to get information from the KMotion input window into a C program?
Can you give an example?
Regards,
Taras.

Re: Label from C program

Posted: Sat Mar 23, 2024 12:57 am
by TomKerekes
Hi Taras,

See this Screen Editor Video. In the Add example KFLOP reads 2 User inputs (Edit Controls), converts them to a value, adds them, converts the result to a character string, and displays the string in a DROLabel on the screen. The Add example begins at 12:50 in the video.


Re: Label from C program

Posted: Sat Mar 23, 2024 6:02 am
by Tarasevih
Hi Tom.
Thanks Tom it turns out so easy.
I also wanted to ask what is the maximum number of VAR variables allowed in Kflop ?
Regards,
Taras.

Re: Label from C program

Posted: Sat Mar 23, 2024 7:00 am
by TomKerekes
Hi Taras,

See

#define N_USER_DATA_VARS 200

In KMotionDef.h