Hello Guest it is October 23, 2019, 08:24:31 PM

Author Topic: I'm in Hog Heaven  (Read 73944 times)

0 Members and 1 Guest are viewing this topic.

Re: I'm in Hog Heaven
« Reply #90 on: January 05, 2015, 01:26:24 PM »
Thank you Sir, nice to have a plan start to come together.  ;D

The photo shows a 1-1/4" x 7 thread cut in 10 passes and 3 cleanup passes at a 29degree angle.

and for you TP you said you like fancy macros and cool code here is the macro I created to cut threads using G32.
Have one for the cutting uniform shapes too (1 - 360+) sides.
makes life a lot easier then relying on a post processor that mostly spits out useless code.

Code: [Select]
O7734 (G32 Macro for Threading)
#1=-1.15 (length in Z)
#2=1.125 (diameter of screw)
#3=.2 (Z clearance)
#8=.3 (X clearance)
#4=10 (number of cutting steps or passes)
#5=3 (number of cleanup passes)
#21=0 (Start in Z position)
#6=29 (vector angle to thread at)
#7=7 (Threads per inch)
(External Thread Depth = .61343 x [ 1/# of threads per inch])
(Internal Thread Depth = .54127 x [ 1/# of threads per inch])

#20=#2 (X value to go to)
#7=[1/#7] (Pitch Feed)
#9=[0.61343 * #7] (Thread depth at 75%)
#9=[#9/#4] (Thread pass increment depth)
#6=tan[#6*#9](step over value in Z using the vector angle)
#9=[#9*2] (to make it in Diameter mode)

G20 G90
m100 (my spindle orientation call)
G97 S400 M04
M98 P100 L[#4] (cut threading passes)
M98 P101 L[#5] (cleanup passes)
G0 X#2
M30

O100 (Cut)
G00 X[#2 + #8] Z[#21 + #3]
#20=[#20 - #9]
X[#20]
G32 X[#20] Z[#1] F#7
G00 X[#2 + #8]
#21=[#21 - #6]
Z[#21 + #3]
g4p2
m99

O101 (Finish)
G00 X[#2 + #8] Z[#21 + #3]
X[#20]
G32 X[#20] Z[#1] F#7
G00 X[#2 + #8]
Z[#21 + #3]
g4p2
m99



Note: No guarantees it works on your setup as this was written for kmotionCNC until Mach4 plugin is done.

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: I'm in Hog Heaven
« Reply #91 on: January 05, 2015, 06:21:58 PM »
HIYA Craig THAT is the beauty of parametric Gcode and subs. Even better when you add in conditional to the Gcode.

Have you tried cutting the hex on the lathe. We had a discussion going on a while back on doing that.

(;-) TP
Re: I'm in Hog Heaven
« Reply #92 on: January 05, 2015, 06:31:31 PM »
Thanks, yep I've cut squares, hex's and rectangles so far. Did you not see the videos I linked to earlier?

Still adding to the macros, added calculations and new features.

Hopefully with Mach4 we will get it all. Only time will tell.

I'm as happy as a kid at Christmas with how this is working so far. I love my Dynomotion/Kflop/Kanalog package.

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: I'm in Hog Heaven
« Reply #93 on: January 05, 2015, 08:33:42 PM »
In the video you cut the threads THEN milled the hex correct ?? What I was talking about was using the lathe bit to cut the Hex shape instead of milling it.

(;-) TP

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: I'm in Hog Heaven
« Reply #94 on: January 05, 2015, 09:30:57 PM »
Craig here is a Video of the process using Mach3

https://www.youtube.com/watch?v=DajrTlI8IWA
Re: I'm in Hog Heaven
« Reply #95 on: January 05, 2015, 11:14:28 PM »
Ya I remember that video, I thought it cool too, but having the mill head I don't need to worry about shaking my machine like the exercise machine that Mom had in the 60's.  ;D

Offline Dan13

*
  •  1,244 1,244
    • View Profile
    • DY Engineering
Re: I'm in Hog Heaven
« Reply #96 on: January 06, 2015, 03:11:36 AM »
Since I've made that video, been using this little program every now and then. Saves lots of time and makes life simple. However, cutting a hex with a standard tool bit hardly gives sufficient clearance. Starting from octagon and on things get better. But in plastics and aluminum, hexagons are no problem either.

Dan
Re: I'm in Hog Heaven
« Reply #97 on: January 06, 2015, 05:13:23 PM »
Thanks Dan for letting me try your code out, not sure id ever use it but Ya-Nvr-No

Had to make some changes as it did not work the same for me as you.
It did not want to rotate the spindle fully till I added some multipliers and loop indexers
but I did get it to work, cool code thou confusing to follow.

Here's a real short clip of it running. (slow) ;)

http://youtu.be/kA1u10cX2SM

Update: Think I figured a use for this, I need to create a hex in some large screws. Think I will try to adapt it to do ID hex profiling, If I can get it close to size I can then Grind a hex in a old carbide end mill and then use it as a sizing broach.  8)
« Last Edit: January 06, 2015, 08:41:32 PM by Ya-Nvr-No »

Offline Dan13

*
  •  1,244 1,244
    • View Profile
    • DY Engineering
Re: I'm in Hog Heaven
« Reply #98 on: January 07, 2015, 04:30:26 AM »
Nice video. Thanks for sharing.

Just pay attention to the clearance of the tool when you do the hex.

Dan
Re: I'm in Hog Heaven
« Reply #99 on: January 09, 2015, 04:24:39 PM »
Using 4 tools I ran my first full program to complete a 1/4-28 bolt with a 1/2" hex including part off. So its coming along nicely.

You think Lua is tough, working with Dynomotions C programs makes it all worth while. Whole different world working with source code and controlling machines. Then again Macro A and FapLadder was a PITA to learn too.  8)