Dwell on spindle speed change (not tool change)

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

Re: Dwell on spindle speed change (not tool change)

Postby rojhan » Sat Jun 11, 2022 10:55 pm

ger21 wrote:
I also reduced my spindle spin-up delay by 3 seconds.

I think most people can greatly reduce spin up speed in their VFD settings. I had no issues setting my Huanyang accel time to 1 second.


It's not the spindle itself, but if I'm adding 3 seconds to S, I can make the controller reduce it's M3 delay by the same 3 seconds, net result is the same overall delay.
rojhan
 
Posts: 23
Joined: Fri Jun 10, 2022 4:45 pm

Re: Dwell on spindle speed change (not tool change)

Postby ger21 » Sat Jun 11, 2022 11:15 pm

Oh, I misunderstood. I'd still recommend speeding up the accel in the VFD.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: Dwell on spindle speed change (not tool change)

Postby rojhan » Sun Jun 12, 2022 2:55 am

I just found that my spindle provides both relay and open collector outputs that can be programmed for "spindle is running at set speed". I should be able to tie that into a UCCNC input to "pause" operation, right? Of course, I'd need to find a way to override when/where needed. Hmmm.
rojhan
 
Posts: 23
Joined: Fri Jun 10, 2022 4:45 pm

Re: Dwell on spindle speed change (not tool change)

Postby Dazp1976 » Sun Jun 12, 2022 8:27 am

rojhan wrote:I just found that my spindle provides both relay and open collector outputs that can be programmed for "spindle is running at set speed". I should be able to tie that into a UCCNC input to "pause" operation, right? Of course, I'd need to find a way to override when/where needed. Hmmm.


I was thinking about this too.
My servo has 'speed reached'.
I thought maybe adding that to a 'cycle start' / 'cycle pause' button.
So speed reached = on = cycle start, off = cycle pause.
But 1. Is that how it even works?. 2. Can it even be done?.

Another is to split the program in 2. One for the roughing and one for the clean up/finishing.
This is what I generally do as sometimes I will want to change bit.
Dazp1976
 
Posts: 162
Joined: Wed Mar 16, 2022 12:57 pm

Re: Dwell on spindle speed change (not tool change)

Postby rojhan » Sun Jun 12, 2022 5:25 pm

I ended up with exactly what I wanted. I built a "wait until spindle is at requested speed (frequency) macro" and then added that macro after the S command in the MOP header template.

"Didn't make it pretty, but..."
Code: Select all

// Wait for spindle to reach requested speed


const int pin_spindle=11;     // Input pin for spindle ready
const double fail_seconds=10; // Max time to wait for ready

bool ready=AS3.GetLED(pin_spindle);
bool fail=false;
double start_time=DateTime.Now.Ticks;
double elapsed=0;

if(!AS3.Getbuttonstate(114))  // Check for M3
  {
  exec.AddStatusmessage("Spindle is not running. No spindle delay needed.");
  return;
  }

if(ready)
  {
  Thread.Sleep(500);  // Debounce to allow the spindle status to change if already running
  ready=AS3.GetLED(pin_spindle);
  }
if(ready)
  {
  exec.AddStatusmessage("Spindle is already ready.");   
  return;
  }

exec.AddStatusmessage("Waiting for spindle.");
while(ready==false)
  {
  elapsed=(DateTime.Now.Ticks-start_time)/10000000;
  if(elapsed>fail_seconds)   
    {
    exec.AddStatusmessage("Spindle took too long to be ready.");
    exec.Callbutton(130);
    fail=true;
    break;
    }
  else     
    ready=AS3.GetLED(pin_spindle);
  }
if(!fail) 
  exec.AddStatusmessage("Spindle is at requested speed.");
rojhan
 
Posts: 23
Joined: Fri Jun 10, 2022 4:45 pm

Previous

Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 5 guests