Default feedrate at startup

If you have a question about the software please ask it here.

Default feedrate at startup

Postby Greolt » Sat Sep 23, 2017 2:25 am

Feedrate defaults to 6 at startup.

Step Jog is done at the presently set feedrate.

Very often one of the first things I do at startup is position the spindle at the origin of the job. This involves step jog.

For me 6mm/min is frustratingly slow. MDI is the only way to set feedrate to my desired speed.

How do I alter the default feedrate set at startup

I tried adding the following to the constructor macro,

AS3.Setfieldtext("1000",867);
As3.Validatefield(867);

This does succeed in setting the Fset DRO to 1000 but that value is ignored by the step jog. Still jogs at 6mm/min.

Also tried,

exec.Code("F1000");
Greolt
 
Posts: 229
Joined: Sun Sep 04, 2016 6:22 am

Re: Default feedrate at startup

Postby dezsoe » Sat Sep 23, 2017 5:56 am

To set feedrate you first have to wait for UCCNC to get ready and turn off reset. You cannot do this all in the constructor macro. Create a new macro with the following code and set it in Config macroloops as Autorun.

Code: Select all
// ================================================================================================
// Set feedrate on first reset
// ================================================================================================

bool ResetNow = exec.GetLED(ResetLED);

if (FirstRun && !ResetNow)
{
  while (!exec.GetLED(ResetLED))
    Thread.Sleep(10);
  ResetNow = exec.GetLED(ResetLED);
}

FirstRun = false;

if (NeedCheck && !ResetNow)
{
  NeedCheck = false;
  Thread.Sleep(100);
  exec.Code("F1000");
  AS3.Additemtolistbeginning("F1000 is set", 2);
}

// ================================================================================================

#Events

// ================================================================================================

const int ResetLED = 25;

static bool FirstRun = true;
static bool NeedCheck = true;

This will first wait for reset signal to get ready, and then it waits for the first press of reset. On the first press of reset it sets "F1000" as you need.
dezsoe
 
Posts: 2049
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Default feedrate at startup

Postby ger21 » Sat Sep 23, 2017 11:28 am

Thanks for that. So many things you can do, that most people wouldn't even know where to start.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Default feedrate at startup

Postby Greolt » Sat Sep 23, 2017 12:01 pm

Thanks dezoe

Wow... this simple tradesman has some reading to do to try and figure what all that means. :D

I must say, is this something UCCNC needs a setting for in Gen Config?

Maybe a default feedrate of 6mm/min won't bother any other users. Just me! :shock:
Greolt
 
Posts: 229
Joined: Sun Sep 04, 2016 6:22 am

Re: Default feedrate at startup

Postby ger21 » Sat Sep 23, 2017 12:29 pm

No, it bothers everyone.
This little macroloop would be the equivalent of Mach3's initialization string, which you'd use in Mach3 to get around the 6 unit/min feedrate. :)
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Default feedrate at startup

Postby dezsoe » Sat Sep 23, 2017 3:54 pm

Thanks! It was an after-wake-up-before-coffee job, with some surprise. I thought it'll be 3 minutes to finish. It was. Until program restart. Normally the code would contain only the check for NeedCheck and the reset LED. But if you shrink the code to that, it will not work on startup. I'll show it to Balázs, because it's not normal, that macroloop starts before the M99998 constructor is finished, and when it first starts, reset is in an unknown state. (Exactly, it is not unknown: reset is on inside the system, but it's LED isn't on yet, so the condition is true to go, but internal logic tells that reset is on. The result is a nice reset warning on startup, and the NeedCheck is fired, so it will not run on later reset click.) So, it was not 3 minutes, it was about an hour. :)

BTW: I also "left" it turned on with F100 when I finished. :)
dezsoe
 
Posts: 2049
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Default feedrate at startup

Postby cncdrive » Sat Sep 23, 2017 5:46 pm

The startup sequence is an interesting question and basicly there is no 100% satisfactory solution for all cases, because there is the startup macro, there are macro loops, there are plugins and each of them may use and may depend on the others and so with every possible startup sequences there will be a possibly an issue.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: Default feedrate at startup

Postby dezsoe » Sat Sep 23, 2017 6:10 pm

Yes, I know it's not easy. Anyway, I found the solution, so first I wait for the reset LED to turn on.
dezsoe
 
Posts: 2049
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Default feedrate at startup

Postby Greolt » Sat Sep 23, 2017 11:38 pm

ger21 wrote:No, it bothers everyone.
This little macroloop would be the equivalent of Mach3's initialization string, which you'd use in Mach3 to get around the 6 unit/min feedrate. :)


I have had F1000 in the Mach3 initialisation string for so long that I had forgotten Mach3 defaulted to F6 at startup.

If in fact it does bother a lot of users, then maybe this should be settable at program level, rather than users needing to use a clever macroloop like what dezsoe has kindly written

I would hazard a guess that most UCCNC users are not experienced programmers like dezsoe.
Greolt
 
Posts: 229
Joined: Sun Sep 04, 2016 6:22 am

Re: Default feedrate at startup

Postby Sword » Wed Jan 31, 2018 4:43 pm

+1 on the ability to have a config setting for a start up feedrate. While the above macro works, it only works if you don't do anything else first. For example, if you just want to load a file for preview and do so without first hitting Reset, the macro doesn't set the chosen feedrate when you finally do hit Reset (it does give the message that it was set though).
Sword
 
Posts: 16
Joined: Fri Dec 08, 2017 10:45 pm

Next

Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 0 guests