Hello Guest it is September 20, 2019, 08:39:44 AM

Author Topic: Manual chipbreaking script?  (Read 3176 times)

0 Members and 1 Guest are viewing this topic.

Manual chipbreaking script?
« on: October 14, 2011, 05:56:35 PM »
Hi,

I was wondering how a script could be written to define a key which would jog the z-axis down when the keydown occurs, and retract a predefined amount when the keyup occurs. I would want to use this for manual drilling. I'm currently using pageDown and pageUp keys, but too much pause is required between pressing the two keys.

Thanks for any help,
Scott

Offline BR549

*
  •  6,895 6,895
    • View Profile
Re: Manual chipbreaking script?
« Reply #1 on: October 14, 2011, 10:37:52 PM »
The main question would be why would you want to do a manual process on a CNC machine that emulated an auto process.

Why not just type in the code to drill a hole?

BUT just in case, I don't think you can emulate what you want via a script AND run it as a MANUAL function. It would require functions that may  not exist and time delay problems that do exist.

Just a thought,(;-)TP
Re: Manual chipbreaking script?
« Reply #2 on: October 15, 2011, 04:48:40 AM »
>The main question would be why would you want to do a manual process on a CNC machine that emulated an auto process.
>Why not just type in the code to drill a hole?

It all depends on the hardware one is using. Mine is coolant free, has limited leadscrew torque, and limited rigidity.
My handwritten code that is conservative enough to drill a 3/8" hole in 1-3/4" 6061 without crashing takes well over an hour.
But with the 'look and feel' method I can center drill and deep drill the same stock without a tool change in a couple of minutes.

>BUT just in case, I don't think you can emulate what you want via a script AND run it as a MANUAL function. It would require
>functions that may  not exist and time delay problems that do exist.

I wrote a script in AutoHotKey which when holding down alt-d does a mouseDown on the Jog Z-- button, and when alt-d is released, the Jog Z-- button is released. Then the AutoHotKey script immediately executes a user button VBscript that tries to wait for the movement to stop before executing the G-code to retract the Z-axis by 0.030" or so. The only problem is that the While-isMoving-Wend sequence doesn't seem to work. I have to use a sleep (475) to ensure the motion has stopped before executing the retract code.
Maybe 'isMoving' only knows of motions initiated in the same script. If anyone knows how to detect when motion has stopped, I would sure like to know. The 475 dwell is a bit long for my liking, but it ensures the retract executes every time, not just most of the time.

The bottom line is... the time delay problems you mentioned still exist.

All the best,
Scott

Offline BR549

*
  •  6,895 6,895
    • View Profile
Re: Manual chipbreaking script?
« Reply #3 on: October 15, 2011, 09:52:58 AM »
IF you can do it fast manually then you can do it cnc based at the same rate as you would doing it manually . THINK about it.


(;-) TP

Re: Manual chipbreaking script?
« Reply #4 on: October 15, 2011, 04:43:09 PM »
Hi,

I THINK if I had spare stock to test drill dozens of holes I could speed things up considerably. CNC only follows instructions, so at least on my homebuilt beast CNC can never detect and react to a hole that is not yet centered, or to a fixture that is beginning to flex, or tooling that is starting to vibrate, etc. That is where the human touch -- watching, listening, and compensating can make such dramatic decreases in cutting time. Actually, if I could afford the luxury of a drill press and a high helix cobalt bit, I wouldn't mind competing with a low-end CNC machine.

Getting back on topic, does anyone know if motor tuning, i.e. acceleration/deceleration is saved with each screenset? I THINK I may be able to reduce dwell by making a screenset just for manual drilling with minimal deceleration settings. Just a thought I will soon test.

Still, can someone THINK of a way to detect actual time of motion stopped? isMoving appears not to work in a script that didn't initiate the movement.

All the best, and think different,
Scott

Offline RICH

*
  • *
  •  7,361 7,361
    • View Profile
Re: Manual chipbreaking script?
« Reply #5 on: October 15, 2011, 05:42:32 PM »
However you end up drilling your holes.......... please do it safely so you don't get hurt.
Some of the stuff you are describing is just asking for trouble no matter how you do it.
RICH

Offline simpson36

*
  •  1,374 1,374
    • View Profile
Re: Manual chipbreaking script?
« Reply #6 on: October 19, 2011, 10:11:07 AM »
You follow BR549's sound advice and still monitor your drilling. I do it all the time.

If you think differently and learn the Code for drilling by heart, you can slap one in there in a few seconds and then manually monitor and adjust out chatter, stalling (maybe), flexing of fixtures or whatever my mousing over the feed and speed overrides.

Typically there is more than one hole to drill and once you have the params 'felt out', an huge advantage of using the g-code is that you just type in the next coord and the machine will automaticall drill the next hole with the 'feel good' params you just manually adjusted.

If your machine can not drill two identical holes with the same settings, then you need to think differently . .  like about getting another machine.

OK, kidding aside, if you want to think differently, then consider this;  Rigidity issues in drilling are normally caused primarily by the force needed to displace the metal at the center non-cutting part of the bit. If you have a rigidity problem, but you have some power in the spindle, try drilling a small pilot hole first, say a 1/16" hole followed by the 3/8 drill.You may also benefit greatly by using split point bits. Either of these solutions will dramatically reduce the amount of down force needed to move the drill bit into the work. If it takes you over an hour to make a 3/8" hole in 6061, then I can just about guarantee you will same time making a pilot hole first. Don't make the pilot hole bigger than the non-cutting part of the follow-on drill bit or you may get chattering.

Offline Hal

*
  •  60 60
    • View Profile
Re: Manual chipbreaking script?
« Reply #7 on: October 23, 2011, 05:34:44 PM »
try 1000 to 1500 rpm at 1 ipm peck depth of .100 " safety of .020" for the 3/8 drill
6000rpm at 3ipm peck depth .050" for the 1/16 drill.
I would use the peck drill cycle, but if you have a deep hole cycle,
Al little lard from the Kitchen would give some lube to your bits.

Last option spot the hole and get a cheap drill press to finish the depth