I will watch this one myself,,
Gary
I am looking for some help on creating a macro to run a probing cycle one a part in the 4th axis. I am needing to find the center between 2 flanges that stick off the part being held in the 4th axis and update my G59 a axis offset. So basically I want to lower the probe to .200" above the part and rotate the 4th axis until it bumps one flange. Then rotate the opposite direction until it finds the other flange. run the math and update G59 A axis offset. I can handle the math portion and get it to update the offset, but I do not know how to program the probing cycle to find the 2 flanges. Any help would be greatly appreciated.
Similar Threads:
I will watch this one myself,,
Gary
I have not written a program to find center yet. Mainly because it isn't letting me update the a axis for the offset I am trying to use. However I have been able to center it. I know how many degrees from the touch point (G31) and begin my cycle afterwards. I basically run the code below.
G31 A90 (rotate towards 90 degrees until touch)
G91 A-8.8 (incremental distance mode to back off 8.8 degrees)
G90 ( change back to absolute distance mode)
Well, there's two things missing. The first is that we don't have a built-in cycle to measure a rotary pocket/boss, but you could fake it by writing the stored offset data into macro variables then doing your math to find the center. However the bigger problem is that the renishaw probe cycle is only programmed to move in XYZ when performing measurements, no ABC rotation. So, to measure your part, you'll need to make an entirely new cycle (which it looks like you're starting to do). Either that or find some random applications guy that has already done it. Wouldn't that be nice
I'm not sure how much you've looked into the probe routines, so this may not be useful, but might point you in the right direction in the event that you need to write the code yourself. For probing single surfaces, the branching program calls o9811 (XYZ measure) which sets the probe target coordinates depending on which direction the probe should move. Then there's a call to o9726 (single surface measure) which is where the actual probing occurs. You'll find two G31 lines which represent the two beeps. That's the stuff you need to emulate for writing your own.
I have a template program for an "in-process measurement" which I inserted below with some modifications for your workpiece. Note that #5064 represents the current machine value for the A-axis during the probe. For comparison, the renishaw measurement cycles use #5061, #5062, #5063 for XYZ respectively.
There's a lot of editing to make this actually perform the function you want, especially with the math comparison. That's all up to you! FWIW renishaw doesn't like when people use the probes for movements other than moving straight perpendicular onto the measure surface, since it "scrapes" the probe tip on the workpiece and can degrade the tip over time. Ultimately it depends on the probe feedrate though, so you can always slow it down.
The below code is very basic, and doesn't include any backoff movements, compensation for probe tip radius, multi-touch measurements (only one beep per surface), etc. Adding that stuff would speed up the process, but it'll require going a level deeper, up to you.
************************************************** **********************
G103 P1
G4 P1 (they recommend using these null lines when preventing lookahead)
G4 P1
G4 P1
G4 P1
G4 P1
G4 P1
N10 G00 G90 G20 G40 G53 Z0.0
N20 T25 M6 (T25=probe)
N30 G00 G90 G59 X0.0 Y0.0 A0.0 (move to X,Y,A starting location above part)
N40 G43 H25 Z3.0 (rapid move close to part - BE CAREFUL HERE!!!)
N50 G65 P9832 (activate probe)
N60 G65 P9810 Z.200 F100.0 (protected positioning move in Z - alarm if part is contacted)
N70 (measurements happen here...)
G4 P300
G31 A?????? F4.0 (measure flange #1)
#501=#5064 (store #5064 "A coordinate" into a macro variable of your choosing, like 501 or something)
G31 A?????? F4.0 (measure flange #2)
#502=#5064 (store #5064 again)
N100 G00 G90 3.0 (Raise Z)
N120 G65 P9833 (deactivate probe)
N130 G00 G90 G53 Z0.0
(put your sweet math here)
#5324=???
M99 (return to main program)
Lol. I'll try. It's below. Really. Keep looking. Lol.
Dang forum software always shrinking images...
but unfortunately that one won't do the right actions. It's meant to perform two consecutive Z-negative beeps onto a flat surface, then apply an A-axis offset to level out that surface. OP is looking for a pocket probing routine except the pocket needs to involve an A-axis movement rather than XY.
I see. If the OP needs help shrinking images I can help.