SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2724
- Joined: Mon Dec 04, 2017 1:49 am
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
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.
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.
Tom Kerekes
Dynomotion, Inc.
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Hi Tom
What is the function of the reset pin #4 on JP7, JP6, JP4 ?
best regards
What is the function of the reset pin #4 on JP7, JP6, JP4 ?
best regards
- TomKerekes
- Posts: 2724
- Joined: Mon Dec 04, 2017 1:49 am
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
It is an output that can be used by User Hardware.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Hi Tom
does kflop and konnect works with Mach 4 ?
regards
does kflop and konnect works with Mach 4 ?
regards
- TomKerekes
- Posts: 2724
- Joined: Mon Dec 04, 2017 1:49 am
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
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
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
- TomKerekes
- Posts: 2724
- Joined: Mon Dec 04, 2017 1:49 am
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Hi Noel,
Here is an example using Screen Script to change the background color of text Button from Red to Green:
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
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.
Tom Kerekes
Dynomotion, Inc.
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
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,
Thank you
also how to do this please.TomKerekes wrote: ↑Mon Jan 06, 2025 6:09 pmYou would probably want to use a state machine approach in your forever loop in Thread #1 to do multiple things at the same time.
Thank you
- TomKerekes
- Posts: 2724
- Joined: Mon Dec 04, 2017 1:49 am
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Hi Noel,
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
You might read this.i need that some buttons be disabled when running G code like jog buttons, how can do that,
You might read this wiki article.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.
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.
Tom Kerekes
Dynomotion, Inc.
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Thank you Tom,
it's working now, i have some buttons locked up while running G code.
it's working now, i have some buttons locked up while running G code.