Page 1 of 1

Milling 45 degree angles in z-axis

Posted: Sun Feb 23, 2025 10:54 pm
by frankljs
I’m trying to mill some 45° angles in the Z axis. I can’t seem to figure out how to do the programming in intercom. I just can’t get the order right for the repeat cycle. Basically I’m programming the linear moves and I need to go down 0.01 and over in the X axis 0.01 in order to make the angle.
The repeat cycle sub program take care of the movement in the X axis by 0.010 no problem, but doesn’t have decrement in the Z axis unfortunately. I tried using depth repeat, and then subprogram repeat in the X axis, but it didn’t work correctly. I think i need to some add a -z incramental move.
If someone could give me an example of how to program this, I would be grateful. Here’s some pics of basically what I’ve got so far.
Angle programming starts at block 35.

Re: Milling 45 degree angles in z-axis

Posted: Sun Feb 23, 2025 10:59 pm
by frankljs
Here is the pic of the part im trying to program. The part will be oriented in the vice, the same as the picture. And I’m trying to get the 45° angles on the sides.
I’ve made a handful of these before, but I just used angle blocks; I just wanted to try something different this time.

Re: Milling 45 degree angles in z-axis

Posted: Mon Feb 24, 2025 4:34 am
by suntravel
I would handcode a loop for this.

Example in metric

Code: Select all

N0001 
; Description: 45Deg stepdown
; Programmer: Uwe
; Date: 24-Feb-2025
  M25 G49 ; Goto Z home, cancel tool length offset 
  G17 G40 ; Setup for XY plane, no cutter comp 
  G21 ; millimeter measurements 
  G80 ; Cancel canned cycles 
  G90 ; absolute positioning 
  G98 ; canned cycle initial point return 
; --- Tool #2 ---
;Tool Diameter =   10.0000  Spindle Speed = 6000
;45Deg Mill
  G49 H0 M25 
  G0 X0.0 Y0.0
N0002 T2 M6
  S6000 M3
  M8
  G4 P1.00 ; pause for dwell
  G43 D2
;Variables
#103 = 0.2  
#104 = 5

N100
G0 Z0.0
G1 X0.0 Y-30.0 Z0.0 F400.0
G0 X0.0 Y-30.0 Z1.0
G0 X0.0 Y0.0 Z1.0
; --- Loop ---
N200
G0 X[0.0+#103] Y0.0 Z[0.0-#103]
G1 Y-30.0
G0 Z[1.0-#103]
G0 Y0.0
#103=[#103+0.2]
IF #103 < #104 THEN GOTO 200 ELSE GOTO 300

; --- End of Program ---
N300 G49 H0 M25
  G40 ; Cutter Comp Off 
  M5 ; Spindle Off 
  M9 ; Coolant Off 
  G80 ; Cancel canned cycles 
  M30 ; End of program 
Uwe

Re: Milling 45 degree angles in z-axis

Posted: Mon Feb 24, 2025 7:32 am
by frankljs
Thank you. Honestly ive never hand written a program, but seems like a good place to start messing around. Where in your example does it show the number of times it repeats?

Re: Milling 45 degree angles in z-axis

Posted: Mon Feb 24, 2025 7:46 am
by suntravel
#103 is the step amount in X and Z
#104 is the desired final amount in X and Z

it repeats till the value in #104 is reached 5/0.2=25 so in this example 25 repeats

Uwe

Re: Milling 45 degree angles in z-axis

Posted: Mon Feb 24, 2025 7:52 am
by frankljs
Also, can you explain this statement more clearly, please?
IF #103 < #104 THEN GOTO 200 ELSE GOTO 300

Re: Milling 45 degree angles in z-axis

Posted: Mon Feb 24, 2025 7:54 am
by frankljs
I saw your response thanks!

Re: Milling 45 degree angles in z-axis

Posted: Mon Apr 07, 2025 2:48 am
by cnc king
N35 G17 G21 G40 G49 G80 G90
N40 G0 X0 Z0
N45 M98 P100 L5
N50 G0 X0 Z0
N55 M30

O100
N100 G91 G1 X0.01 F100
N105 G91 G1 Z-0.01 F100
N110 M99