Rapid / Feed override

Moderators: TomKerekes, dynomotion

Post Reply
cemoa9
Posts: 82
Joined: Mon Jun 01, 2020 11:01 am

Rapid / Feed override

Post by cemoa9 » Fri Oct 08, 2021 2:02 pm

Hello Tom,

I am trying to get an easy access to rapid or feed override without clicking on the buttons everytime, is there a way to (2 options that I see for my set-up) :

1) have both on them on screen, but I could read somewhere that we cannot add sliders, si may not work
2) have the sliders changing from rapid to feed by an external button (which I am already using to select what stuff to do with the MPG)

Cordially

Francois

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

Re: Rapid / Feed override

Post by TomKerekes » Fri Oct 08, 2021 3:59 pm

Hi Francois,

I'm not sure I understand.

But you can select FRO Rapid or Feed by executing Screen Script from a C Program.

Here is an example to select Feed

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_Feed;BM_CLICK;"))
		printf("Screen Script Failed\n");
	else
		printf("Screen Script Success\n");
}

And for Rapid

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_Rapid;BM_CLICK;"))
		printf("Screen Script Failed\n");
	else
		printf("Screen Script Success\n");
}
You can also change the FRO and RRO using external commands:

#define PC_COMM_SET_FRO 5 // Persist+1 is the FRO as a float
#define PC_COMM_SET_FRO_INC 6 // Persist+1 is the factor to change it as float

#define PC_COMM_SET_RRO 54 // Persist+1 is the RRO (Rapid Rate Override) as a float
#define PC_COMM_SET_RRO_INC 55 // Persist+1 is RRO (Rapid Rate Override) the factor to change it as float

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

cemoa9
Posts: 82
Joined: Mon Jun 01, 2020 11:01 am

Re: Rapid / Feed override

Post by cemoa9 » Sat Oct 09, 2021 3:18 pm

Hello Tom,

Thanks, the two code samples will be perfect, to let you understand, I have a 10 positions switch (X, Y, Z, A, G1, G0, spindle) and a MPG, depending on the switch position the MPG will move the axis or change the feedrate, rapid or spindle, now with your code the slider will change automatically to the selected one.

Cordially

Francois

cemoa9
Posts: 82
Joined: Mon Jun 01, 2020 11:01 am

Re: Rapid / Feed override

Post by cemoa9 » Thu Oct 21, 2021 8:17 am

Hello Tom,

Well, unfortunately it does not work, I will try to be clearer, that may help :oops:

As mentionned I change FRO and RRO via a unique MPG, FRO or RRO are selected by a switch, target is that when the switch is on the FRO position, then FRO slider is active and shown on the screen, and when RRO is selected then to have RRO active and shown.

I tried that code : ScreenScript("WinMsg:DlgName;IDC_Feed;BM_CLICK;");

But it did not work.

Cordially

Francois

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

Re: Rapid / Feed override

Post by TomKerekes » Thu Oct 21, 2021 4:01 pm

Hi Francois,

What happened? Post the program you tried. What was printed on the Console? What Version are you using?
Regards,

Tom Kerekes
Dynomotion, Inc.

cemoa9
Posts: 82
Joined: Mon Jun 01, 2020 11:01 am

Re: Rapid / Feed override

Post by cemoa9 » Tue Oct 26, 2021 1:18 pm

Hello Tom,

Well nothing happens, console would write "Screen Script Success" but the Feed or Rapid slider is not getting selected. I am using 4.35f version, I attached the init file, concerned lines from 570.

Cordially

Francois
Attachments
Init.c
(14.26 KiB) Downloaded 73 times

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

Re: Rapid / Feed override

Post by TomKerekes » Tue Oct 26, 2021 5:46 pm

Hi Francois,

For Screen Script to work a Screen Script Screen must be active. Have you configured a Screen Script Screen to be used? Or are you using a standard screen Face?
Regards,

Tom Kerekes
Dynomotion, Inc.

cemoa9
Posts: 82
Joined: Mon Jun 01, 2020 11:01 am

Re: Rapid / Feed override

Post by cemoa9 » Wed Oct 27, 2021 1:24 pm

Hi Tom,

Changed the screen script to a custom one, works now perfectly!

Thanks.

Francois

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

Re: Rapid / Feed override

Post by TomKerekes » Wed Oct 27, 2021 5:41 pm

Hi Francois,

Great. btw you should really change the C Program to only send the button click once when it changes or only so often rather than constantly while the bit is set.
Regards,

Tom Kerekes
Dynomotion, Inc.

cemoa9
Posts: 82
Joined: Mon Jun 01, 2020 11:01 am

Re: Rapid / Feed override

Post by cemoa9 » Wed Nov 03, 2021 9:05 pm

Performed as recommanded, thanks Tom !

Post Reply