Hello Guest it is March 28, 2024, 09:19:28 AM

Author Topic: Help with internal spline Wizard  (Read 3065 times)

0 Members and 1 Guest are viewing this topic.

Help with internal spline Wizard
« on: May 15, 2014, 02:51:48 PM »
Hi Guys

Been doing a internal slotting wizard. A first for me. Not taking all the credit ..... the wizard has been build up from small snipets of code I took from other wizards already posted.
So far its working as planed.
One change I would like to make is to instead off completely  finishing each spline before moving on to the next one I would like to cut all splines by one increment at a time set in the wizard before advancing to the next increment  and loop spline for spline until the final depth has been reached. I think this will give me a more even spline form all round, as the tool might wear.

This is the sub I am using . I really tried to shift the code around to get it to loop like I want, but to no avail .


Code "M98 P0001 Q" & Teeth
Code "G0A0"
Code "Z" & XStart
Code "X" & RapidPlane
Code "M9"
Code "M30"
Code ""
Code ""
Code "O0001"
Nc = 1

Do
     DEPTHPASS = StartPos + (NC*Depthper)
     If DEPTHPASS > (StartPos + Depth) Then
       Depthpass= StartPos + Depth
     End If
     Code "G0 " & Axis  & Depthpass &" F" & feedplunge 
     code "G1Z-" & Abs(Xstart + Feeddistance) & " F" & FeedCut
     Code "G0 " & Axis &  RapidPlane
     Code "Z-" & XStart   
     Nc=Nc+1

If Nc > 3000 Then
       Code "(Out on bad loop, junk program)"
       Exit Do
     End If

Loop While   DEPTHPASS < StartPos + DEPTH
Code "G91A" & deg_move
Code "G90"
Code "M99"

CloseTeachFile

Call LoadTeachFile()
End Sub
Main       
All help appreciated.

Thanks
Deon                                 
If A is a success in life, then A equals X plus Y plus Z.
                               Work is X: Y is play and Z is keeping
                                                             your mouth shut.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Help with internal spline Wizard
« Reply #1 on: May 22, 2014, 01:02:59 AM »
FIrst program the actual motion functions in a Gcode SUB to get the motions correct. THAT will show you what you need to do to make the Wizard program the sub correctly.

(;-) TP
Re: Help with internal spline Wizard
« Reply #2 on: May 22, 2014, 04:22:06 AM »
Hi BR549

Thanks for trying to help or rather push me to try harder :D . I guess that is the only way to learn.
I did try a lot of different itterations but the display I get from the toolpathe in mach3 scares me to even try it on the machine.

But I take the challenge, I wont stop untill I get it.
IT works fine as it is at the moment but one fully finished spline at a time.
Maybe I need to change the variables to something that makes more sense to me instead of keeping it from the snippits I got from the other wizards.

Will post again when it works like I want it to.

Thanks
Deon
If A is a success in life, then A equals X plus Y plus Z.
                               Work is X: Y is play and Z is keeping
                                                             your mouth shut.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Help with internal spline Wizard
« Reply #3 on: May 22, 2014, 11:41:26 AM »
Here is a TIP. Mch3 does not always display things as you think it should. There are somethings that confuse it. BUT the machine may cut just fine.

There should be 2 sections to the program the first is to create 1 cut per spline all the way around. then it should loop into the 2nd section where it does a total number of REVs to achieve the final depth.


IF you can't figure it out get back and post the WHOLE program or the WIZARD. It is hard to work with just small portions without seeing the entire program.

(;-) TP

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Help with internal spline Wizard
« Reply #4 on: May 22, 2014, 02:37:30 PM »
See if this is what you are doing Gcode wise. IF it is then in your wizard all you need to do is populate the #vars.   and Code"" the gcode into the wizard.

Using the Gcode Sub approach 1 program fits ALL combinations of splines(within the physical possibilities).  This Gcode is also assuming that you are cutting below the centerline of A axis  NOT above the centerline. AND the linear axis is X. You can change the code to suite the machine.

(Internal Spline Cut)
(Created By Internal Spline Wizard)
(05-20-2014)
G90 G50 G49 G80 G40

G0 X0 Y0 Z0

#100 = 9            (number of splines)
#101 = .250         (Spline depth)
#102 = .050          ( Zstep)
#103 = [360 / #100]  (A steps)
#104 =30             (Feedrate)
#105 = [#101 / #102]  (#Zsteps)
#106 = [-1*#102]
#107 = 0
#108 =-2.00        ( inside Diameter)


G0 Z[-1*#108]
M98 P1 Q#105
G90

M30

o1
M98 P2 Q#100
#106 = [#106 - #102]
M99

%

o2
G00 A#107
G0 Z[#106 + #108]
G1 X-6  F#104
G0 Z [[#106 + #108] +.010] (Lift Z .010 before return)
X0
G0 Z[[#106+#108] ]          (Return to Z Height)
#107 =[#107 + #103]


M99
%