The middle bit?
Please add a few comments to your code so we know what the problem is.
I ran the code with an emulator and get 3 rectangles with tool changes.
Your imagination is better than my conceptualizing.
Can anyone here help me with writing a Parametric program for a One piece MDF door I am making?
I guess you can call it a pocket route.
I am using a 2.75 fly cutter to hog out the middle. Basically I want to tell the program X= a certain length, and Y = a certain length. My stiles and rails are 2.3125 and have it clean out the middle at a specified depth.
I have a Heian Router, with a fanuc controller.
Any help would be greatly appriciated.
This is how far I have gotten so far... I just can't figure out the middle part.
I am also using a 1/2" and 1/8" bit to clean the corners....
N10G0G17G20G40G49G80G90Z0
M211
M400
M402
T10M6
#1=3.6875(FLY CUTTER)
#2=.375 (Z DEPTH)
#3=2.5625 (1/2" CUTTER)
#4=2.375 (1/8" CUTTER)
G08P1
N20G55M91S15000X[#500/2]Y#1
N30G43H42Z.25
N40G1G90G1Z-#2F200.G61
X#1F300.
N50Y[#501-#1]
N60X[#500-#1]
N70Y#1
N80X#1
N90G40G49G0G64Z0M95
M400
M401
T9M6
N100G54M91S20000X[#500/2]Y#3
N110G43H9Z.25
N120G1G90Z-#2F162.5G61
X#3F325.
N130Y[#501-#3]
N140X[#500-#3]
N150Y#3
N160X#3
Z1.0
N170G40G49G0G64Z0M95
M400
M402
T11M6
G55M91S18000X[#500/2]Y#4
N190G43H43Z.25
N200G1G90Z-#2F25.G61
X#4F200.G61
N210Y[#501-#4]
N220X[#500-#4]
N230Y#4
N240X#4
Z1.0
G0G40X6.Y6.
N250G0G49G64Z0M95
M12
M22
G53Y0
N260G08P0
M212
M99
%
Similar Threads:
The middle bit?
Please add a few comments to your code so we know what the problem is.
I ran the code with an emulator and get 3 rectangles with tool changes.
Your imagination is better than my conceptualizing.
Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. THREE ways to fix things: The RIGHT way, the OTHER way, and maybe YOUR way, which is possibly a FASTER WRONG WAY!
Yes, three rectangles is correct. What I am looking at doing, is cleaning out the middle of the rectangle with the first fly cutter. That is what I am calling the middle of the program. Let's say my door is 12.0 = #501 and 14.0 = #500
After running my current program there will be a 2" in the "Y" direction and a 4" piece in the "X" direction left in the middle.
I want the cutter to know that based on the size of the door, the size of my stiles and rails, the diameter of the cutter, that there is still more material to be cleaned out. No matter the variables in #500 and #501
I tried attatching a picture, but it failed to upload??
O453(PRODUCTION SHAKER LEFT)
N10G0G17G20G40G49G80G90Z0
M211
M400
M402
T10M6
#1=3.6875(FLY CUTTER)
#2=.375 (Z DEPTH)
#3=2.5625 (1/2" CUTTER)
#4=2.375 (1/8" CUTTER)
G08P1
N20G55M91S15000X[#500/2]Y#1
N30G43H42Z.25
N40G1G90G1Z-#2F200.G61
X#1F300.
N50Y[#501-#1]
N60X[#500-#1]
N70Y#1
N80X#1
(HERE)
N90G40G49G0G64Z0M95
M400
M401
T9M6
N100G54M91S20000X[#500/2]Y#3
N110G43H9Z.25
N120G1G90Z-#2F162.5G61
X#3F325.
N130Y[#501-#3]
N140X[#500-#3]
N150Y#3
N160X#3
Z1.0
N170G40G49G0G64Z0M95
M400
M402
T11M6
G55M91S18000X[#500/2]Y#4
N190G43H43Z.25
N200G1G90Z-#2F25.G61
X#4F200.G61
N210Y[#501-#4]
N220X[#500-#4]
N230Y#4
N240X#4
Z1.0
G0G40X6.Y6.
N250G0G49G64Z0M95
M12
M22
G53Y0
N260G08P0
M212
M99
%
To make the .jpg smaller, open it with MS PC paint, ignore how it looks, and 'save as' the same .jpg file. Beware that if PC crashes, while saving (and mine has from time to time) it can destroy the original jpg file(s), so use a different name if it is your only picture file. Dunno why it destroys them but happens when I try to do too many files at once.
Some sort of memory leak?? Who cares. Just be defensive.
You probably hit the 500K jpg size limit.
Bigger files can be uploaded to photobucket or similar, and inlude the link.
Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. THREE ways to fix things: The RIGHT way, the OTHER way, and maybe YOUR way, which is possibly a FASTER WRONG WAY!
Here is the picture
Do the cutter sizes represent cutter radius?
Where do the numbers 2.5625 and 2.375 come from?
If you make a subprogram that goes around once and decrements an X and Y value by the cutter radius each call, and calculate the number of calls required and put this in as the L[#loops] value, the routine will get called #loop times changing settings each pass, therby clearing out any area you decide upon.
Your program needs to initialize #500 and #501 at the start, so you don't get a big (crash) surprise if you the program a week later.
ALWAYS initialize ALL variables, or at least make a program crash if they are zero.
A dummy line Nxxx 100/[#number] will stop program because of divide by zero error.
IMHO...
Your program would be much easier to read with some spaces in it, and a few more comments.
It will help you later, when you use the program in 3 months time too.
I am not a cabinet maker, so the term stiles and rails have no meaning to me as a programmer.
Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. THREE ways to fix things: The RIGHT way, the OTHER way, and maybe YOUR way, which is possibly a FASTER WRONG WAY!
Looks like he is using 3 tools, Normal Sized cutter a 1/2 cutter and a 1/8 cutter (at least from what I can figure)
#1 ; #3 ; #4 all look like toold offsets for them to begin at EG DX-RailWidth (Tool Dimension Included)
Personally I'd code it Like this in Zilog
L Tooldiam1 = 10
L Tooldiam2 = 8
L Tooldiam3 = 4
L BorderWidth = 50
then when I am calling the G0
G0 X= DX-BorderWidth+Tooldiam1
(Now thats easier for a layman to understand, if your language doesn't allow words as variables you could use # numbers)
I agree with the Loops (As I am not familiar with the language you are using, I'll just say what I would do for something like this, more like an algorithm)
Now there really is an easier way to do this than using a NCommand (I'd Use a G1)
L Loopvalue = BorderWidth+(ToolDiam1/2)
.StartLoop
L LoopValue = LoopValue + ToolDiam1/2 (I divide by 2 as it gives a cleaner cut takes longer though)
G0 X= BorderWidth + (Tooldiam1/2) Y=LoopValue Z = Depth T = 101?
G1 X= DX-(Tooldiam1/2)
If LoopValue>= DY-ToolDiam1 then Goto endloop
Goto StartLoop
.EndLoop
//The fiddly bit would be to clean up that final liune with a routing after the program is done
G0 X=BorderWidth+(ToolDiam1/2) Y=DY-BorderWidth-(Tooldiam1/2)
G1 X=BorderWidth - (Tooldiam1/2)
That would be the start of the program at least I would think so...
Then if you are wanting to be really fancy you'd run another router down the line to make Tongue&Grooves within the cleaned area as well (Thats slightly more complicated because you have to allow the T&G tolerance adjustment within the looping frame so you have to first calculate the differences and then run them with an adjustment field to allow it to fit in any size door (EG I want my T&G to be 80mm apart but I'll Accept the value you can fit in the area, when I did that I found the T+G was never more than 1/8 difference between actual and desired and always fitted square.)
thanks,
let me give this a try