SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Moderators: TomKerekes, dynomotion

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

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by TomKerekes » Mon Jul 22, 2024 7:31 pm

Hi Noel,

Actions to be associated with those buttons can be assigned in the Tool Setup. See here.

However the Stop action is performed after disabling the Axes so a "Controlled Stop" would not be possible. The idea is that the Stop Button should only be used in an emergency where a controlled stop may not be possible or successful, otherwise use Halt. If you wish to do this then you might replace the Stop Button with a custom button to do whatever you wish.
Regards,

Tom Kerekes
Dynomotion, Inc.

NOELNOG
Posts: 170
Joined: Wed Nov 10, 2021 3:54 pm

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by NOELNOG » Fri Aug 16, 2024 2:12 pm

Hi Tom

What is the function of the reset pin #4 on JP7, JP6, JP4 ?

best regards

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

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by TomKerekes » Fri Aug 16, 2024 4:29 pm

It is an output that can be used by User Hardware.
Regards,

Tom Kerekes
Dynomotion, Inc.

NOELNOG
Posts: 170
Joined: Wed Nov 10, 2021 3:54 pm

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by NOELNOG » Wed Aug 28, 2024 10:06 pm

Hi Tom

does kflop and konnect works with Mach 4 ?

regards

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

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by TomKerekes » Wed Aug 28, 2024 10:21 pm

No
Regards,

Tom Kerekes
Dynomotion, Inc.

NOELNOG
Posts: 170
Joined: Wed Nov 10, 2021 3:54 pm

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by NOELNOG » Mon Jan 06, 2025 4:39 pm

Hi Tom

I am designing a new custom screen interface for a cnc router, i need to add some new user buttons and i would like to make them, light up or change their color when be active, like toggle button but some of em will be momentary just push and keep light on, and turn off when push other button, also some buttons add some blinking e.g like the Init button blinking from green to red or E stop button blinking from red to yellow, as well be able to control the buttons status from c, program.

Thanks in advance

Noel

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

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by TomKerekes » Mon Jan 06, 2025 6:09 pm

Hi Noel,

Here is an example using Screen Script to change the background color of text Button from Red to Green:

Code: Select all

#include "KMotionDef.h"

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

void main()
{
	for (;;)
	{
		if (ScreenScript("ID:IDC_But12,Colors:ff;ff0000;FFFFFF;800000"))  // background red
			printf("Screen Script Failed\n");
		else
			printf("Screen Script Success\n");
		
		Delay_sec(1);
		
		if (ScreenScript("ID:IDC_But12,Colors:ff;00ff00;FFFFFF;800000"))  // background green
			printf("Screen Script Failed\n");
		else
			printf("Screen Script Success\n");
		
		Delay_sec(1);
	}	
}

You would probably want to use a state machine approach in your forever loop in Thread #1 to do multiple things at the same time.

KFLOP commands are only updated on status requests that occur ~ 10 times/second so you wouldn't want to send too may commands.

To change colors of buttons with bitmaps you would need to create bitmaps with different colors.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

NOELNOG
Posts: 170
Joined: Wed Nov 10, 2021 3:54 pm

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by NOELNOG » Mon Jan 06, 2025 9:06 pm

Yes, I have created some bitmap buttons, also i need that some buttons be disabled when running G code like jog buttons, how can do that,
TomKerekes wrote:
Mon Jan 06, 2025 6:09 pm
You would probably want to use a state machine approach in your forever loop in Thread #1 to do multiple things at the same time.
also how to do this please.

Thank you

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

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by TomKerekes » Tue Jan 07, 2025 2:44 am

Hi Noel,
i need that some buttons be disabled when running G code like jog buttons, how can do that,
You might read this.

You would probably want to use a state machine approach in your forever loop in Thread #1 to do multiple things at the same time.
You might read this wiki article.

Basically to blink a button set the button to color #1 then set a state variable to 1, record the time, and exit.

if in state 1 check if the desired time has elapsed, if not exit, if so, set to color #2, set the state variable to 2, record the time and exit.
if in state 2 check if the desired time has elapsed, if not exit, if so, set to color #1, set the state variable to 1, record the time and exit.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

NOELNOG
Posts: 170
Joined: Wed Nov 10, 2021 3:54 pm

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by NOELNOG » Tue Jan 07, 2025 10:35 pm

Thank you Tom,
it's working now, i have some buttons locked up while running G code.
Captura de pantalla (13).png

Post Reply