#garfield Logs
Feb 13 2019
#garfield Calendar
08:15 AM zhanx: rue_mohr, yep
08:19 AM zhanx: for now, i have the ramps, the steppers, the j head for the next one
07:44 PM Tom_L: rue_mohr
07:44 PM Tom_L: what am i doing wrong?
07:47 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Smartcam/Thread_14.mcl
07:47 PM Tom_L: it's a macro to generate thread code
07:47 PM Tom_L: it will generate a 1/4 - 20 fine
07:48 PM Tom_L: when i go to define a 3/8 - 16 the first cut is way too small
07:48 PM Tom_L: the idea is to make 2 light passes
07:48 PM Tom_L: but anything other than a 1/4 - 20 the first pass is too small
07:48 PM Tom_L: see if my math is ok?
07:49 PM Tom_L: thread major minor
07:49 PM Tom_L: 1/4 .25 .1887
07:49 PM Tom_L: 3/8 .375 .2983
07:50 PM Tom_L: 1/2 .500 .4056
07:51 PM Tom_L: it prompts for variables it can't find. i'm just not sure if i'm defining the "#FIRST_HELIX_CUT" correctly
07:51 PM zhanx: #FIRST_HELIX_CUT = (((#FINAL_HELIX_R + #SMALL_HELIX_R )/2)- #SMALL_HELIX_R) <- is odd
07:51 PM Tom_L: threadmill diameter is .180
07:52 PM Tom_L: i calculated it for the 1/4 - 20 first and that's what makes it work
07:52 PM Tom_L: the idea is to use the minor diameter and cut out approx half the distance between it and the major diameter
07:52 PM Tom_L: on the first pass
07:53 PM zhanx: #FIRST_HELIX_CUT = (((#FINAL_HELIX_R - (#THREADMILL_D/2) - #SMALL_HELIX_R)
07:53 PM Tom_L: offsetting the tool by it's radius
07:53 PM zhanx: forgot a couple of ))
07:54 PM Tom_L: so the tool should protrude past an imaginary circle about half the cutter depth
07:54 PM Tom_L: on the minor diameter
07:54 PM Tom_L: i just got carried away defining it :)
07:54 PM zhanx: yep
07:55 PM Tom_L: other than that it works great
07:55 PM Tom_L: creates a lead in move and however many threads you tell it
07:56 PM zhanx: you first cut is the small helix_r plus tool radius offset off the final diameter to make it a light pass right?
07:57 PM Tom_L: i believe so
07:57 PM Tom_L: i should define it the same as the major diameter but use the minor and offset it by the tool in the positive direction i think
07:57 PM zhanx: so my edit should work
07:57 PM zhanx: or or
07:58 PM zhanx: final - small+ threadmill
07:58 PM Tom_L: threadmill/2
07:58 PM Tom_L: that sounds right, lemme test it
08:00 PM Tom_L: which one should i try first?
08:01 PM zhanx: the last
08:01 PM Tom_itx: #FIRST_HELIX_CUT = (((#FINAL_HELIX_R - #SMALL_HELIX_R + (#THREADMILL_D/2))
08:01 PM zhanx: yes
08:01 PM zhanx: that might need to be #FIRST_HELIX_CUT = (((#FINAL_HELIX_R - #SMALL_HELIX_R + (#THREADMILL_D/2)/2)
08:01 PM Tom_L: i'm learning this macro language as i go too
08:02 PM Tom_L: why?
08:02 PM zhanx: but i think the extra /2 will be offset off diameter not radius
08:02 PM zhanx: its weird how your mixing it
08:02 PM Tom_L: what do you mean?
08:03 PM Tom_L: i'm working with what the template language want's to see
08:03 PM zhanx: you have too radius and one diameter
08:03 PM zhanx: i would have all radius
08:03 PM zhanx: or all diameter and make it not swap back and forth
08:04 PM Tom_L: you mean the threadmill?
08:04 PM zhanx: yep
08:04 PM Tom_L: just an extra step
08:04 PM Tom_L: it inputs them all as diameter
08:04 PM zhanx: I know and ocd me and it don't get along
08:05 PM Tom_itx: #THREADMILL_R = #THREADMILL_D/2
08:05 PM zhanx: That is what i would do
08:06 PM zhanx: would prevent me from messing up later on a revist in 10months
08:07 PM zhanx: granted i write like a paragraph of comments on my intent for stuff also when i code for later
08:07 PM zhanx: i never assume i will remember what i was doing after a year
08:09 PM zhanx: ok changes to my 3d printer code complete
08:10 PM zhanx: need to review the gcode chart now and get a few open M codes to set bed size and store it to the eeprom
08:10 PM Tom_L: that didn't seem to work for 1/4 20
08:10 PM zhanx: output?
08:10 PM Tom_L: i'm looking at a graphic
08:11 PM zhanx: too small or to big?
08:11 PM Tom_L: bit
08:11 PM Tom_L: g
08:11 PM zhanx: ok add the /2
08:12 PM zhanx: too bad its not giving you a numbers read out
08:12 PM zhanx: wait
08:12 PM zhanx: doing this all wrong
08:13 PM zhanx: why do we care about the final pass when its the first pass we need right
08:14 PM zhanx: the first pass is a hole of final - small/2+ threadmill
08:15 PM Tom_L: the idea is to split the difference between the minor and major diameters and cut half that on the first pass
08:15 PM rue_mohr: ?
08:15 PM Tom_L: you're late!
08:15 PM zhanx: tom then you need the #FIRST_HELIX_CUT = (((#FINAL_HELIX_R - #SMALL_HELIX_R + (#THREADMILL_D/2)/2)
08:16 PM Tom_L: i'll try that
08:16 PM Tom_L: see i have one done for the 1/4 20 and i ran the code so i know it's right
08:16 PM Tom_L: so if the graphic overlays it, i know it's right
08:16 PM zhanx: swap the #threadmill_d/2 with #threadmill_R
08:17 PM zhanx: if you want
08:20 PM Tom_L: looks wrong
08:20 PM zhanx: how
08:20 PM Tom_L: too big
08:21 PM zhanx: oh wait
08:21 PM zhanx: tom then you need the #FIRST_HELIX_CUT = (((#FINAL_HELIX_R - (#SMALL_HELIX_R + #THREADMILL_R)/2)
08:21 PM Tom_L: final radius should be .035" for a 1/4 20
08:22 PM zhanx: k
08:22 PM zhanx: one sec
08:22 PM Tom_L: final radius for the final pass ^^
08:22 PM zhanx: ok
08:22 PM Tom_L: to give you an idea
08:23 PM Tom_L: and the first pass for the 1/4 20 i figured to be .0153" radius
08:23 PM Tom_L: for the cutter center path
08:24 PM zhanx: cutter dia?
08:24 PM Tom_L: r
08:24 PM Tom_L: .035 + .090 (half the cutter) = .125 which is half the major diameter
08:24 PM Tom_L: which is correct
08:25 PM Tom_L: i just need to get the minor one right
08:25 PM Tom_L: preferrably cutting half the material on the first pass
08:25 PM Tom_L: no matter what pitch it is
08:28 PM zhanx: #FIRST_HELIX_CUT = (((#FINAL_HELIX_R - (#SMALL_HELIX_R - #THREADMILL_R))
08:29 PM zhanx: wait
08:29 PM Tom_L: hah
08:29 PM zhanx: #FIRST_HELIX_CUT = (((#FINAL_HELIX_R - (#SMALL_HELIX_R+(#SMALL_HELIX_R - #THREADMILL_R)))
08:30 PM Tom_L: it gets confusing
08:30 PM zhanx: try that out
08:31 PM zhanx: that should do it
08:31 PM Tom_L: all the () in the right place?
08:31 PM zhanx: yep
08:32 PM Tom_itx: error
08:32 PM Tom_L: lemme look it over
08:33 PM zhanx: #FIRST_HELIX_CUT = (#FINAL_HELIX_R - (#SMALL_HELIX_R+(#SMALL_HELIX_R - #THREADMILL_R)))
08:33 PM zhanx: my bad
08:34 PM zhanx: I edit the back side not the front (
08:35 PM Tom_L: that's _WAY_ off
08:35 PM Tom_L: too big
08:36 PM zhanx: #FIRST_HELIX_CUT = (#FINAL_HELIX_R - #SMALL_HELIX_R-(#SMALL_HELIX_R - #THREADMILL_R)) will drop it by all radius
08:37 PM zhanx: wait if SMALL_HELIX_R is less than #THREADMILL_R it will get a negetive
08:37 PM zhanx: which will add to it
08:37 PM Tom_L: it can't be or it won't fit in the hole
08:38 PM Tom_L: small helix has to be bigger than the threadmill diameter
08:38 PM zhanx: what are you passing as that?
08:38 PM Tom_L: else it will break the cutter
08:38 PM Tom_L: what do you mean?
08:38 PM zhanx: .90 is the cutter what is small_helix
08:39 PM Tom_L: #SMALL_HELIX_R = ((#MINOR_DIAMETER/2) - (#THREADMILL_D/2))
08:39 PM Tom_L: maybe we should be working with the minor_diameter instead
08:40 PM Tom_L: i use the final directly in the helix command
08:40 PM zhanx: .125-.90/2 = -.325
08:40 PM Tom_L: so if we define the small_helix the same way but offset the cutter tip a little...
08:41 PM Tom_L: .90 is already half the cutter
08:41 PM Tom_L: the cutter diameter is .180"
08:41 PM Tom_L: but only part of that is cutte
08:41 PM Tom_L: r
08:42 PM Tom_L: but the > on the cutter is defined by the major and minor diameters
08:42 PM zhanx: Tom do the math .125-.90
08:43 PM Tom_L: that's the final pass diameter
08:43 PM Tom_L: .035"
08:43 PM zhanx: no its -0.775
08:43 PM Tom_L: the first pass should be somewhat less than that
08:43 PM Tom_L: .090
08:43 PM Tom_L: where do you get .90?
08:43 PM zhanx: oTom_L> .90 is already half the cutter
08:43 PM furrywolf: "WEATHER INCOMING: A Hellrain Will Soon Fall and the Eel May Flood, Endangering Cattle" sigh...
08:44 PM Tom_L: half the cutter is .090 not .90
08:45 PM Tom_L: and .125-.090 is .035 which is the radius for the final pass
08:46 PM Tom_L: so on a 1/4 20 thread there should be approx .03065" material removal total
08:46 PM zhanx: .035 - .0153 = .0197
08:47 PM Tom_L: where do you get that?
08:47 PM zhanx: and the first pass for the 1/4 20 i figured to be .0153" radius
08:47 PM zhanx: so that is difference in the circles.
08:49 PM zhanx: so .035 -.0197 = 0.0153
08:50 PM Tom_L: where's the .0153 coming from?
08:50 PM zhanx: you on your first pass
08:50 PM zhanx: stepping through the math
08:50 PM Tom_L: i'm getting confused
08:51 PM Tom_L: i'm glad the original is on the serve :)
08:51 PM Tom_L: server
08:51 PM zhanx: #FIRST_HELIX_CUT = (#FINAL_HELIX_R - #SMALL_HELIX_R)
08:51 PM zhanx: that is the code you need
08:52 PM Tom_L: i'll try it
08:59 PM Tom_L: the first pass is a little close to the final i think, lemme run a test
08:59 PM zhanx: #FIRST_HELIX_CUT = (#FINAL_HELIX_R - #SMALL_HELIX_R+(#SMALL_HELEX_R/2) will add some padding
09:00 PM zhanx: #FIRST_HELIX_CUT = (#FINAL_HELIX_R - #SMALL_HELIX_R+(#SMALL_HELEX_R/2)) will add some padding
09:00 PM zhanx: #FIRST_HELIX_CUT = (#FINAL_HELIX_R - #SMALL_HELIX_R-(#SMALL_HELEX_R/2)) will add some padding if i can math right damn
09:04 PM Tom_L: something's not quite right.. brb
09:07 PM zhanx: think rue died
09:10 PM Tom_L: what if i take the difference between the major and minor diameters /2 and subtract that from the FINAL_HELIX_R for the first pass?
09:10 PM zhanx: that should work
09:10 PM Tom_L: i'm getting kinda confused with all these iterations
09:11 PM zhanx: #FIRST_HELIX_CUT = (#FINAL_HELIX_R - #SMALL_HELIX_R-(#SMALL_HELEX_R/2)) will add some padding if i can math right damn
09:11 PM zhanx: wait
09:11 PM zhanx: ugh
09:11 PM Tom_L: i got about 6-8 commented out here
09:11 PM Tom_L: making me confused :)
09:11 PM zhanx: #FIRST_HELIX_CUT = (#FINAL_HELIX_R - (#FINAL_HELIX_R - #SMALL_HELIX_R/2))
09:11 PM zhanx: #FIRST_HELIX_CUT = (#FINAL_HELIX_R - (#FINAL_HELIX_R - #SMALL_HELIX_R)/2)
09:12 PM zhanx: that one
09:12 PM zhanx: hit enter too fsat
09:13 PM Tom_L: only i need to remove the threadmill_R from small_helix_r for that don't you think?
09:13 PM Tom_L: it only needs to be accounted for once
09:13 PM Tom_L: and it's in the final one
09:14 PM zhanx: you already do it
09:14 PM zhanx: https://pastebin.com/ck0T6ziL
09:16 PM Tom_itx: yeah that's what i have
09:16 PM Tom_itx: i'll run it
09:19 PM Tom_L: that's not bad for the 1/4 20
09:19 PM Tom_L: lemme try a 3/8
09:19 PM zhanx: k
09:20 PM Tom_L: the minor one isn't quite what i figured but i was guessing when i did it manually
09:20 PM Tom_L: the final was the money cut
09:20 PM zhanx: good
09:22 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Smartcam/threadmacro1.jpg
09:23 PM Tom_L: the green horizontal lines are the major and minor diameters
09:23 PM Tom_L: you can see the cutter is taking a little more than the minor one on the first cut and looks about like half
09:24 PM zhanx: its close
09:24 PM Tom_L: the blue ones are for the 3/8...
09:24 PM Tom_L: gonna run it now
09:26 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Smartcam/threadmacro2.jpg
09:26 PM Tom_L: it's close
09:27 PM Tom_L: the tool for the 3/8 would be a little different anyway
09:27 PM zhanx: k
09:27 PM Tom_L: thanks, i think i can live with that
09:29 PM zhanx: no problem that is why we are here
09:29 PM Tom_L: if the threads are tight i can fudge on the major diameter a little like .3755 or .376 etc
09:29 PM zhanx: yep
09:30 PM Tom_L: if you look at the code, i had to define the final pass first othewise i wouldn't know what elements were what as they are added to the list
09:30 PM Tom_L: ELMT_SEQ[BA=0, EL="2", ME=0]
09:30 PM zhanx: saw that
09:31 PM Tom_L: means insert it before element 2
09:31 PM zhanx: hence why i stepped tho the math so i could learn it
09:31 PM Tom_L: ELMT_SEQ[BA=1, EL="3", ME=0]
09:31 PM Tom_L: element 2 becomes element 3 because of the addition of the lead in line
09:31 PM Tom_L: BA=1 means insert after the element instead of before
09:32 PM Tom_L: then it iterates the single helix on top of the first one however many threads you want
09:33 PM zhanx: k
09:33 PM Tom_L: i'm not sure how to do it but i'd like to add a Z linear move at the start of the thread so it feeds into the hole
09:33 PM Tom_L: not sure how to keep track of the element count to do that
09:33 PM zhanx: gcode addition
09:34 PM zhanx: let me think on it
09:34 PM Tom_L: it would have to be last because you don't know how tall the thread will be until you enter the count
09:34 PM zhanx: yep
09:34 PM Tom_L: thread count * pitch would be the start Z
09:35 PM Tom_L: added to the final which is the first position defined
09:35 PM Tom_L: i'd just have to keep track of how many elements there were to insert it in the right place
09:36 PM zhanx: yep
09:36 PM Tom_L: actually that won't be hard
09:36 PM Tom_L: because it will still be the 2nd element
09:37 PM Tom_L: on the final pass
09:37 PM zhanx: code it and if needed i can help debug it
09:37 PM Tom_L: i may finish it tomorrow
09:37 PM Tom_L: full_threads is the count
09:38 PM Tom_L: so that * pitch
09:38 PM Tom_L: added to z
09:39 PM Tom_L: the FULL[] at the bottom just zooms out. i have it commented out for now
09:39 PM zhanx: k
09:42 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Smartcam/ThreadMill.mcl
09:42 PM Tom_L: final so far
09:56 PM rue_mohr: sorry I got my head burried in this TTS
10:02 PM zhanx: tis ok
10:02 PM zhanx: me and Tom_L got it figured out
10:04 PM Tom_L: got one of em done
10:10 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Smartcam/ThreadMill.mcl
10:10 PM Tom_L: i think that's got it
10:11 PM Tom_L: Z feed move starting at the top of the thread
10:11 PM Tom_L: (you cut threads from the bottom up)
10:11 PM zhanx: true
10:12 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Smartcam/threadmacro3.jpg
10:12 PM Tom_L: tool not shown there
10:13 PM zhanx: looks good, would like to see the tool also, just in case
10:16 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Smartcam/threadmacro4.jpg
10:16 PM Tom_L: that's on the first pass
10:16 PM Tom_L: blue lines are the 3/8 thread
10:17 PM Tom_L: major minor diameters
10:18 PM zhanx: run it on the cnc :D
10:18 PM Tom_L: i will eventually
10:18 PM Tom_L: i've already cut some
10:18 PM Tom_L: and the graphic matches
10:19 PM Tom_L: https://www.youtube.com/watch?v=92D6QqRzGAM&t=1s