Milling 45 degree angles in z-axis

A place to discuss and ask questions about all things Machining for Mills, Lathes, Laser, and Routers

Moderator: cnckeith

Post Reply
frankljs
Posts: 37
Joined: Thu Apr 14, 2022 10:39 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Milling 45 degree angles in z-axis

Post 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.
Attachments
IMG_2185.jpeg
IMG_2184.jpeg


frankljs
Posts: 37
Joined: Thu Apr 14, 2022 10:39 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Milling 45 degree angles in z-axis

Post 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.
Attachments
IMG_1958.jpeg


suntravel
Community Expert
Posts: 3396
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: Milling 45 degree angles in z-axis

Post 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
Attachments
Loop.png


frankljs
Posts: 37
Joined: Thu Apr 14, 2022 10:39 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Milling 45 degree angles in z-axis

Post 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?


suntravel
Community Expert
Posts: 3396
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: Milling 45 degree angles in z-axis

Post 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


frankljs
Posts: 37
Joined: Thu Apr 14, 2022 10:39 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Milling 45 degree angles in z-axis

Post by frankljs »

Also, can you explain this statement more clearly, please?
IF #103 < #104 THEN GOTO 200 ELSE GOTO 300


frankljs
Posts: 37
Joined: Thu Apr 14, 2022 10:39 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Milling 45 degree angles in z-axis

Post by frankljs »

I saw your response thanks!


cnc king
Posts: 9
Joined: Wed Sep 11, 2024 2:08 am
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: No
CNC11: No
CPU10 or CPU7: No

Re: Milling 45 degree angles in z-axis

Post 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


Post Reply