What's new
What's new

Fanuc Haimer macro troubleshooting...

thunderskunk

Cast Iron
Joined
Nov 13, 2018
Location
Middle-of-nowhere
I didn't want to jack rx8pilot's thread. I wrote my own macro for setting work offsets while using the Haimer Taster in my robodrill. It's been working great, except it has some hickups. For some reason it doesn't like writing to G54, or G57 as I've just found out.

Generally, the taster offset is set as tool 22 so I don't have to probe it once in a blue moon and I can still load a tool into slot 21.

My variables are all over the place so they don't conflict with the ones I used for my tool probing macro.

Anything glaringly obvious that I'm doing wrong? When I write to offset 4 (G57) it keeps trying to write from something other than G53, at least that's my theory.

%
O0002
(HAIMER TASTER OFFSET WRITING PROGRAM)

(NOTES)
(TASTER MAY PROBE WITH SOME DEFLECTION. G10 FOR Z AXIS COMPENSATES BY .1)
(BLOCK SKIP TO AVOID PROBING AND TOOL CHANGES)
N1
G90 G94 G17 G49 G40 G80
G53
#4=2 (USED TO CHANGE WHICH WCS IS WRITTEN)
(USING 0 OR 1 INTERFERES WITH PROBING SEQUENCE)
M00
N2
/T16M06
M00
(LOAD TASTER INTO SLOT 21)
N3
/T21M06
M00
/G910 S1 H22 B7.5

M00
N4
(JOG TO Z WCS POSITION)

M00
G91G31Z-0.0F0.1
#16=[#5063-#11022+0.1]
G90G10L2P#4Z#16 (WRITES Z POSITION BASED ON TASTER PROBING)
M00
N5
(JOG TO X WCS POSITION)

M00
G91G31X0.0F0.1
#17=#5061
G90G10L2P#4X#17
M00

(JOG TO Y WCS POSITION)
N6
M00
G91G31Y0.0F0.1
#18=#5062
G90G10L2P#4Y#18
M00
M30
%
 
Well, the first problem is that you are using G31 to generate skip signal positions unnecessarily.

Use 5021-5024 for current position and eliminate all that extra complexity. Just grab #5021 (X), #5022 (Y) and #5023-Haimer Length.
 
Hello thunderskunk,
Yes, as gkoenig points out, the use of G31 is totally unnecessary. Workshift values are actually based on Machine Coordinates (the distance and direction the Workpiece Zero's are from the Machine Zero position (Reference Return position)). Accordingly, as G31 will return a Workpiece Coordinate System position, I can't see how the following will even work for you, unless the current active Work Offset System (G54 - G59)has Zero values registered therein.

G91G31Y0.0F0.1
#18=#5062
G90G10L2P#4Y#18

If you're having trouble writing to some Workshift Registries using G10, simply write directly to the System Variables for Workpiece Zero.


Regards,

Bill
 








 
Back
Top