Label from C program

Moderators: TomKerekes, dynomotion

Post Reply
Tarasevih
Posts: 101
Joined: Fri Jul 09, 2021 11:26 am

Label from C program

Post by Tarasevih » Fri Mar 22, 2024 7:42 pm

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.

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

Re: Label from C program

Post by TomKerekes » Sat Mar 23, 2024 12:57 am

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.

Regards,

Tom Kerekes
Dynomotion, Inc.

Tarasevih
Posts: 101
Joined: Fri Jul 09, 2021 11:26 am

Re: Label from C program

Post by Tarasevih » Sat Mar 23, 2024 6:02 am

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.

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

Re: Label from C program

Post by TomKerekes » Sat Mar 23, 2024 7:00 am

Hi Taras,

See

#define N_USER_DATA_VARS 200

In KMotionDef.h
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply