What's new
What's new

Macro parameter settings for auto tool offset measurement

thunderskunk

Cast Iron
Joined
Nov 13, 2018
Location
Middle-of-nowhere
Evenin' folks,

OK, tool probe installed, level, wired, getting feedback from PLC DGN, life is good.

I'm trying to set the silly thing up in the parameters. The manual says G900 is the distance from the table to the probe, G901 and G902 being the X-Y positions, G903 changes whether the offset is from the spindle or the bottom of the machine (mine is a high column, 300mm), G904 being breakage detection tolerance, G905 being overrun distance,and G906 being the total gage line to table surface (being 300mm in this instance).

When I have it set with G900 in inches, I get a SETTING DATA ERROR #900, which means the height of my switch is too small. My first thought is that it must be in millimeters not inches, so I convert it (but left X and Y in inches). The program now progresses to a point where my tool moves in X and Y to center over the probe, but then gets a DATA ERROR B without budging in Z, which means my B value is too short. The tool was 3.5 inches long, so I simply put B3.5 in the probe command. This is where things don't quite add up; my X and Y parameters were in inches, and that worked perfectly. If I have to convert all of my tool length estimates to metric for every probing, it's going to get old real quick. Changing G903 and G906 didn't seem to make any difference either.

Does anyone understand where the operator error lies here? I know I'm doing something wrong, I just don't know what. My tool probe is set very high in the machine, but it has to be since it's a high column machine and some tools won't reach if I go any lower.

Added: It's a Fanuc Robodrill D21iDL with 16i control, TS27R tool probe, and a generic Fanuc tool length measurement macro. Pretty sure it's identical to the one in the manual.
 
To break it down a bit further, the exact issue is the line where it rapid's down over the switch:

G00Z-[#906-#900-#2-25.0](*)

This comes up with a Z- overtravel alarm, which doesn't add up. #906=780.0, #900=314.2183, #2=250. Thus; 780-314.218-250-25=190.782mm, or 7.5 inches. This is definitely not an over-travel issue. At this point, Z is at 0. The only reason I can see it being over travel is if it's reading inches and not millimeters.

To be on the safe side, I switched the machine to read in metric; same overtravel error. I switched it back into inches, then changed G903 and G906 incrementally down; 680, 580, and 480 (the other possible models of robodrill in case I got it wrong). Same error.

My next step; I'm rewriting the entire O9010 macro into SAE instead of metric. We'll see how that plays out.

I tested G31 skip: X0004 bit 7 is 1 until you press the switch, then it's 0. So I ran this:

G91
G31 X-4.0 F1.0

This only works if I depress the switch continuously. If I don't, it moves .0001 in X then stops. I don't think this is my issue, but it would indicate that once I get past my problems with the rapid movement, I'll need to change a parameter to skip when the switch is off rather than on... does that sound right?
 
I think 6200.1 reads whether the skip signal as active when high/low.

Can you post the 9010 macro?

Sure:

%
O9010(AUTOMATIC TOOL OFFSET)
(S.T X500.0 Y400.0 Z330.0+150+HC)
(TOOL OFFSET MACRO PROGRAM V4.0)
(G910 S* H** B*** D*** M0 )
(CHANGE PARAMETER NO.6050 DATA 910)

(START)
#30=#4001
#31=#4003
IF[#900GE100.0]GOTO10
#3000=110(SETTING DATA ERROR #900)
N10
IF[#901NE#0]GOTO20
#3000=110(SETTING DATA ERROR #901)
N20
IF[#902NE#0]GOTO30
#3000=110(SETTING DATA ERROR #902)
N30
IF[#903NE#0]GOTO40
#3000=110(SETTING DATA ERROR #903)
N40
IF[#11NE#0]GOTO50
#3000=110(DATA ERROR "H" NOT EXIST)
N50

IF[#905EQ0]GOTO60
IF[#905EQ#0]GOTO60
#24=#905
GOTO70
N60
#24=5.0
N70

IF[#906EQ480.0]GOTO80
IF[#906EQ580.0]GOTO80
IF[#906EQ680.0]GOTO80
IF[#906EQ780.0]GOTO80
#3000=110(SETTING DATA ERROR #906)
N80

G91G28G00Z0
#22=#5043
#20=#5021
#21=#5022
G00X[#901-#20]Y[#902-#21]M19
IF[#19EQ1]GOTO1000
IF[#19EQ2]GOTO2000
#3000=110(DATA ERROR "S")

N1000
(AUTOMATIC TOOL MEASURING)
IF[#2EQ#0]GOTO100
IF[#2GT30]GOTO110
#3000=110(DATA ERROR "B")
N100
#2=250.0
N110
IF[#7EQ#0]GOTO120
G00X#7
N120

G00G21Z-[#906-#900-#2-25.0](*)
IF[#13EQ#0]GOTO130
S50M03
G04X0.1
M05
M00
N130
G31Z-[25.0+#24]F100(*)
#25=#5063
#26=#903-[ABS[#22-#25]+#900]
IF[[ABS[#906-#900-#2+#24-ABS[#22-#25]]]GT0.001]GOTO160
#3000=110(DATA ERROR B TOOL SHORT)
N160
Z5.0
G90G10L11P#11R#26
G91G28Z0
IF[#7EQ#0]GOTO3000
G00X-#7
GOTO3000

N2000
(AUTOMATIC TOOL BROKEN)
#29=#[10000+#11]
#3=#29+#900-#903
G00Z-[ABS[#3]-5.0](*)
G31Z-[5.0+#24]F200(*)
#25=#5063
Z5.0
IF[#904EQ0]GOTO200
IF[#904EQ#0]GOTO200
#15=#904
GOTO210
N200
#15=0.5
N210
IF[ABS[ABS[#3]-ABS[#25-#22]]LT#15]GOTO220
G91G28Z0
#3000=120(TOOL BROKEN)
N220
G91G28Z0

N3000
G#30G#31M05
M99
%

Turns out the techs know what they're doing. I was thinking I didn't need an HSI interface since I was happy enough getting a signal, but it's the hardware solution to a normally open signal instead of normally closed. While I was told it was a good idea, the Renishaw guy made it sound optional. What he did say I needed was $500 of software that would create macros for me... so 6 some, then buy another 1/2 dozen... Anyways. That solves the skip signal issue.

I'm still messing with this rapid movement, and I'm debating whether to just take the whole line out of the code. It looks like it was just to save time. The probe is mounted really high, so I don't really need to rapid down at all.

My math was wrong though; it's a high column mill, but only 580mm, not 780. Thus G903 and G906 are 580.000:

580-314-250-25= -9.063

Which is double negative. What bugs me is it comes up with a Z- error. You'd think it was trying to go down...

The more I look at this code, the more I feel like rewriting it. I'm no macro expert, but I don't see any reason for this to be in metric. On top of that, I see nothing to take the diameter of the tool. There's actually spelling errors in the code straight from the manual. The one above was on the machine when I got it.

EDIT: I didn't read into the macro enough and assumed #2=250. My calibration tool is actually 77.5, which is greater than 30, thus: 580-314-77.5-25= 163.5

That makes more sense, but it still doesn't explain why I'm getting z-axis overtravel. Now that I have my math right, I might try adding a G21 to that line and see what happens.

I still feel like I might take out the rapid movement completely.
 








 
Back
Top