Page 1 of 1
RUN GCODE
Posted: Wed May 24, 2023 6:46 am
by IvanSiberia
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?
Re: RUN GCODE
Posted: Wed May 24, 2023 3:16 pm
by TomKerekes
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");
}
Re: RUN GCODE
Posted: Thu May 25, 2023 4:53 am
by IvanSiberia
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
Re: RUN GCODE
Posted: Thu May 25, 2023 5:10 pm
by TomKerekes
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.
Re: RUN GCODE
Posted: Mon May 29, 2023 4:15 am
by IvanSiberia
How can I switch the GCODE stream from KFLOP?
Re: RUN GCODE
Posted: Mon May 29, 2023 6:19 pm
by TomKerekes
Did you try my first response?
Re: RUN GCODE
Posted: Wed May 31, 2023 4:00 am
by IvanSiberia
This method works! Thank you