What's new
What's new

Subroutine questions for multi work offsets (different vices)

helocat

Aluminum
Joined
May 13, 2010
Location
Newberg, Oregon
Running a small part and used my CAM software to put an array of 5 parts across a 6" vice. The Post is making a subroutine to make the 5 parts. Now I have it proven out I want to run in on 3 vices with three different work origins for the full 830 pieces. Simple enough. However the callouts FOR the subroutines keep calling out the origin.

Sample:
(CONTOUR MILL1)
(1/4 EM CRB 2FL 3/4 LOC)
N1 G00 G17 G20 G49 G90
N2 T01 M06
N3 S12000 M03
N4 G52 X.55 Y-1.06 Z0
N5 G00 G54 X0. Y0. S12000 M03
N6 G43 H01 Z1. M08
N7 M97 P1001
N8 G52 X0 Y0 Z0
N9 G52 X.55 Y-1.06 Z0
N10 G00 G54 X0. Y0.
N11 M97 P1002
N12 G52 X0 Y0 Z0
N13 G52 X.55 Y-1.06 Z0
N14 G00 G54 X0. Y0.
(and so on)

I like the idea of the tool working across each vice, then moving to the next vice. Can I just copy and edit the G54 to G55, G56 and past that back in so it moves to each vise? I just don't want to piss off the mill, never hand edited code with subs before.


Material: REPRO UHMP
Part size: 2"x1"x.600"
CAM: CAMWORKS
Mill: 2021 VF2SS

Thank you!
 
Running a small part and used my CAM software to put an array of 5 parts across a 6" vice. The Post is making a subroutine to make the 5 parts. Now I have it proven out I want to run in on 3 vices with three different work origins for the full 830 pieces. Simple enough. However the callouts FOR the subroutines keep calling out the origin.

Sample:
(CONTOUR MILL1)
(1/4 EM CRB 2FL 3/4 LOC)
N1 G00 G17 G20 G49 G90
N2 T01 M06
N3 S12000 M03
N4 G52 X.55 Y-1.06 Z0
N5 G00 G54 X0. Y0. S12000 M03
N6 G43 H01 Z1. M08
N7 M97 P1001
N8 G52 X0 Y0 Z0
N9 G52 X.55 Y-1.06 Z0
N10 G00 G54 X0. Y0.
N11 M97 P1002
N12 G52 X0 Y0 Z0
N13 G52 X.55 Y-1.06 Z0
N14 G00 G54 X0. Y0.
(and so on)

I like the idea of the tool working across each vice, then moving to the next vice. Can I just copy and edit the G54 to G55, G56 and past that back in so it moves to each vise? I just don't want to piss off the mill, never hand edited code with subs before.


Material: REPRO UHMP
Part size: 2"x1"x.600"
CAM: CAMWORKS
Mill: 2021 VF2SS

Thank you!

This is how I’d do it: (disregard line numbers after N7)

-boring stuff removed to shorten post-
N5 G00 G54 X0. Y0.
N6 G43 H01 Z1. M08
N7 M97 P1001
N10 G00 G55 X0. Y0.
N11 M97 P1001
N12 G0 G56 X0. Y0.
N13 M97 P1001
-and so on-

If I’m not mistaken, correct me if I’m wrong, the G52 lines are shifting your G54 offset. Essentially, it’s wanting to move your G54 offset to where your CAM thinks your G55 will be. With my example, all of my offsets have been picked up manually/with a probe during setup, so shifting my offset isn’t necessary.
 








 
Back
Top