Loading screan script files from C programs

Moderators: TomKerekes, dynomotion

Post Reply
JoeKumanchik
Posts: 4
Joined: Fri May 11, 2018 7:17 pm

Loading screan script files from C programs

Post by JoeKumanchik » Tue May 29, 2018 4:07 pm

Hello;

I have created a user button in the KmotionCNC screen to open a custom screen used to enter several values that are passed to and used in a C program. I added two buttons to the new screen, Return and Accept. Pressing the return button returns to the KmotionCNC screen without executing the C program. Pressing the accept button executes the C program. The C program immediately displays a Wait dialog box so I can then press the return button returning to the main KmotionCNC screen where I can acknoledge the Wait dialog box and continue on with the C program. Ideally, I would like to press the accept button and have the C program reload the main KmotionCNC screen. I have exhausted my limited ideas on how to accomplish this task and hoping someone else can help.

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

Re: Loading screan script files from C programs

Post by TomKerekes » Wed May 30, 2018 4:44 pm

Hi JoeKumanchik,

You should be able to configure an MCode to load the Screen. Then have the C Program Invoke the MCode by sending the PC_COMM_MCODE command to KMotionCNC.

DoPCInt(PC_COMM_MCODE,100); // Invoke M100 Action
Regards,

Tom Kerekes
Dynomotion, Inc.

JoeKumanchik
Posts: 4
Joined: Fri May 11, 2018 7:17 pm

Re: Loading screan script files from C programs

Post by JoeKumanchik » Wed May 30, 2018 8:10 pm

Thanks Tom, I will give this a try.

JoeKumanchik
Posts: 4
Joined: Fri May 11, 2018 7:17 pm

Re: Loading screan script files from C programs

Post by JoeKumanchik » Thu May 31, 2018 3:50 pm

Tom,

I tried your suggestion last night and it worked great. thank you for the help.

Post Reply