RUN GCODE

Moderators: TomKerekes, dynomotion

Post Reply
IvanSiberia
Posts: 30
Joined: Fri Jun 17, 2022 11:21 am

RUN GCODE

Post by IvanSiberia » Wed May 24, 2023 6:46 am

I want to check the part after milling. To do this, I measure the finished part. If the dimensions don't match, I want to start a milling cycle in which I will correct the tool size. How can I run from k-flop G-CODE. I found a method to launch GCODE through custom buttons. Can I change the file number via k-flop and run the code with a standard function?

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

Re: RUN GCODE

Post by TomKerekes » Wed May 24, 2023 3:16 pm

Hi Ivan,

I don't understand the question.

But you can change the selected file number with Screen Script. The code below will select file #2

Code: Select all

#include "KMotionDef.h"

#define TMP 10 // which spare persist to use to transfer data
#include "KflopToKMotionCNCFunctions.c"

void main()
{
	if (ScreenScript("WinMsg:DlgName;IDC_Thread2;BM_CLICK;"))
		printf("Screen Script Failed\n");
	else
		printf("Screen Script Success\n");
}
Regards,

Tom Kerekes
Dynomotion, Inc.

IvanSiberia
Posts: 30
Joined: Fri Jun 17, 2022 11:21 am

Re: RUN GCODE

Post by IvanSiberia » Thu May 25, 2023 4:53 am

Now I'm running GCODE from my M105 like this. Are there other options?

Code: Select all


		DoPC(PC_COMM_HALT_NEXT_LINE);
 	        DoPCInt(PC_COMM_USER_BUTTON, 0);  // push test buttons
Attachments
365.jpg

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

Re: RUN GCODE

Post by TomKerekes » Thu May 25, 2023 5:10 pm

Hi Ivan,

I don't think that works. Does it? When GCode is currently running (necessary to command the M105) another GCode Program can't be started.

I suppose you could set a Virtual Bit that could be monitored in a forever loop, and if set and after the GCode stops (!JOB_ACTIVE) it could then push the button.

It would be helpful to have a detailed description of what you are trying to do.
Regards,

Tom Kerekes
Dynomotion, Inc.

IvanSiberia
Posts: 30
Joined: Fri Jun 17, 2022 11:21 am

Re: RUN GCODE

Post by IvanSiberia » Mon May 29, 2023 4:15 am

How can I switch the GCODE stream from KFLOP?
Attachments
test1.jpg
test1.jpg (6.74 KiB) Viewed 4927 times

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

Re: RUN GCODE

Post by TomKerekes » Mon May 29, 2023 6:19 pm

Did you try my first response?
Regards,

Tom Kerekes
Dynomotion, Inc.

IvanSiberia
Posts: 30
Joined: Fri Jun 17, 2022 11:21 am

Re: RUN GCODE

Post by IvanSiberia » Wed May 31, 2023 4:00 am

This method works! Thank you

Post Reply