What's new
What's new

Auto-tram your UMC

coyoinu

Aluminum
Joined
Oct 6, 2012
Location
Orange county, CA
I needed to write a piece of code today that I thought would be useful for y'all

With a calibrated probe in the spindle, this program will check the tram across the B axis, and then do the same probing the T slots along the X axis to check C.

Obviously use your discretion as far as the retract heights and measurement positions. This was programmed assuming nothing is on your table.

.0003" of error across 15" is .001 degree, the minimum resolution of the rotaries.

%
O00750 (TRAM ALL)
(Haas NGC UMC Rotary full tram)

(#10189 is measured angle)
(#10193 is distance error)

(this uses MRZP center point values to know bore position on table)

(#5241= #20255 MRZP X OFFSET)
(#5242= #20256 MRZP Y OFFSET)
(#5243= #20257 MRZP Z OFFSET, THIS IS NOT TABLE HEIGHT)

(use Z surface single probe to find Z height of table)
(When setting Z work offset, may need to subtract TLO of active probe)
(eyeball B and C axes straight, probe will verify)

N10 (B tram O9817)

T19 M06 (Tool 19 is calibrated probe)
#10189= 0
G00 G90 G55 X0 Y0
G0 G43 G55 H19 Z2. (Set G55 Z on table w/ slots aligned to X)
G00 B0 (Make sure B is at 0*)
G65 P9832 (spin probe on)
G65 P9810 X0 Y1.5 Z1. F75. (safe move to 1" above G55)
G65 P9817 X15. Z-1. (probe B tilt across 15" in X, 1" of -Z travel)
G65 P9810 Z1. (safe move back up)
G65 P9833 (probe spin off)
G28 Z10. (retract 10" for safe clear)
M01 (stop)

IF [ABS[#10189]GT 0.0015 ] G00 B#10189 (move B axis by amount probe calculated in macro var 10189)

IF [ABS[#10189]GT 0.0015 ] #3000=1 (B AXIS NOT FLAT)
(Hit reset)
(Go to Settings -> Rotary)
(set B axis tool change offset)
(Then Zero return, single, B)
(run again to check)




N20 (C tram in t slots O9811)

T19 M06 (Tool 19 is calibrated probe)
#10189= 0
G0 G43 G55 H19 Z2. (Set G55 Z on table w/ slots aligned to X)
G00 C0 (Make sure C is at 0*)
G65 P9832 (spin probe on)
G65 P9810 Z1. F75. (move to Z safe position)
G65 P9810 Y0. F75. ( check Y value here)
G65 P9810 X-7.5 F200. (move to first X- measurement point)
G65 P9810 Z-0.5 F35. (DOWN IN SLOT)
G65 P9811 Y1. (probe single surface Y+)
G65 P9834 (STORE DATA)
G65 P9810 Z1. F75. (UP FROM SLOT)
G65 P9810 X7.5 F200. (MOVE TO X+)
G65 P9810 Z-0.5 F35. (DOWN IN SLOT)
G65 P9811 Y1. (probe single surface Y+)
G65 P9834 A0 D15. (COMPARE DATA)
G65 P9810 Z1. F75. (move out of slot)
G65 P9833 (SPIN PROBE OFF)
G28 Z10.
M01

IF [ABS[#10189]GT 0.0015 ] G00 C#10189 (move C axis by amount probe calculated in macro var 10189)

IF [ABS[#10189]GT 0.0015 ] #3000=1 (C AXIS NOT STRAIGHT)
(Hit Reset)
(Go to Settings -> Rotary)
(set C axis tool change offset)
(Then Zero return, single, C)
(run again to check)


G0 G53 Z0
M30

%
 








 
Back
Top