Hello Guest it is March 01, 2021, 07:58:57 PM

Author Topic: tool change macro, how to make it wait for spindle to stop  (Read 2856 times)

0 Members and 1 Guest are viewing this topic.

Offline fast89

*
  •  144 144
    • View Profile
tool change macro, how to make it wait for spindle to stop
« on: October 11, 2013, 07:06:32 PM »
I made an auto tool changer. It works good but i have dwell in there for the spindle to come to a stop from 6k rpm. Usually it is already stopped before the dwell. How do i make it look at the rpm and proceed with the tool change if the rpm is zero?

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: tool change macro, how to make it wait for spindle to stop
« Reply #1 on: October 12, 2013, 03:45:07 AM »
Does your spindle drive have a zero speed signal?
That would be the best way.
If not then it may be a problem depending on whether you use the Parallel Port or an external controller. The parallel port may take a while before the spindle reading sets to zero or at least I think it did but it has been many years since I used the parallel port.
Hood

Offline fast89

*
  •  144 144
    • View Profile
Re: tool change macro, how to make it wait for spindle to stop
« Reply #2 on: October 12, 2013, 07:47:20 AM »
The spindle controller doesn't receive any feedback. I am using the parallel ports. The spindle decels in about 2 seconds. Usually it is stopped before the z ever gets home. I would just like to trim some time off of the tool changes. Isn't there a way to get the DRO then do an if/then comparison

Offline BR549

*
  •  6,944 6,944
    • View Profile
Re: tool change macro, how to make it wait for spindle to stop
« Reply #3 on: October 12, 2013, 10:50:30 AM »
In your tool changer macro you would do a check of the Spindle speed

D0 while GetOemDro(39) > 0
Loop

the code will stay in the LOOP until the value of the DRO gets equal  to zero.

Now mind you it can possible stay locked in the loop IF the DRO does not clear to zero.

Just a thought(;-) TP

Offline fast89

*
  •  144 144
    • View Profile
Re: tool change macro, how to make it wait for spindle to stop
« Reply #4 on: October 12, 2013, 12:45:58 PM »
Worked like a charm! Thanks! ;D

Offline BR549

*
  •  6,944 6,944
    • View Profile
Re: tool change macro, how to make it wait for spindle to stop
« Reply #5 on: October 12, 2013, 06:11:33 PM »
Asa safety I would allow a break out over time to make sure it does not LOCK into the loop and never let you out(reboot required). The following would let you out of the loop IF the Speed =0   OR if it timed out by 10 seconds.

SetOemDro(2050,0)
D0 while GetOemDro(39) > 0 OR GetOemDro(2050)  < 9
SetOemDro(2050, GetOemDro(2050 +1)
Sleep(1000)
Loop


Just a thought, (;-) TP