Page 1 of 1

Loading screan script files from C programs

Posted: Tue May 29, 2018 4:07 pm
by JoeKumanchik
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.

Re: Loading screan script files from C programs

Posted: Wed May 30, 2018 4:44 pm
by TomKerekes
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

Re: Loading screan script files from C programs

Posted: Wed May 30, 2018 8:10 pm
by JoeKumanchik
Thanks Tom, I will give this a try.

Re: Loading screan script files from C programs

Posted: Thu May 31, 2018 3:50 pm
by JoeKumanchik
Tom,

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