Probing Sequence Questions
Hey guys, I've got a few questions about some code for a probing sequence that I've inherited. I'm trying to clean it up but there are a few commands that I'm unsure of. I'm using a Renishaw OMP40-2 in a DMG MORI NZX-2500 series horizontal lathe with a Fanuc controller.
Questions:
1) Since G53 is a one-shot command, is it even doing anything on a line by itself? Is there some reason the original programmer kept calling it?
2) The only thing that the MORI manual states about M2200 is "when stopping pre-read by NC intentionally, specify M2200 where pre-read needs to be stopped." I'm not sure what that implies...why is it called here?
3) I know from watching the program that the G10L52 command is writing to the N4077 parameter to rotate the spindle into a specific orientation, but how does this work? I was expecting to see a G420 C_ after the M19 call.
4) The interesting choice was made to use the MOD command to swap between M19 and M20. I don't understand why M20 is being used. Can I specify a reference position with M19 then use the G420 call as mentioned in question 3 instead?
Thanks for any input. I realize the code below is difficult to follow in its present state.
N100(START MEASUREMENT)
M88(SENSOR OFF)
G28U0
T0808
G0Z[#26-6.]
M53(SENSOR AIR ON)
G04X1.0
#731=4100/3
#732=1(COUNTER)
(///////////////////////////////)
G10L52
N4077P1R0
G11
G53
(///////////////////////////////)
(APPROACH)
M[[#732MOD2.]+19.]
M87(SENSOR-ON)
G0X118.
G31G98Z[#26+4.0]F100
G53
M2200
IF[#5042LT-6.5]THEN#3000=1(X/SKIP-SIGNAL-ON-BEFORE-APPROACH)
(G31G98Z[#26+3.]F500)
G53
M2200
IF[#5042EQ[#26-4.]]THEN#3000=1(X/NO-SKIP-SIGNAL)
G0W-3.
(MEASUREMENT START)
#737=-6.5(LEFT LOWEST Z)
WHILE[#732LE#19]DO1
M[[#732MOD2.]+19.]
G31G98Z[#26+4.]F100
IF[#5042EQ[#26-6.]]THEN#3000=1(X/NO-SKIP-SIGNAL)
G0W-3.
IF[#5062GT#737]THEN#737=#5062
(///////////////////////////////)
G10L52
N4077P1R[#731*#732]
G11
G53
(///////////////////////////////)
#732=#732+1
END1
(///////////////////////////////)
G10L52
N4077P1R0
G11
G53
Re: Probing Sequence Questions
Quote:
Originally Posted by
jester13
Hey guys, I've got a few questions about some code for a probing sequence that I've inherited. I'm trying to clean it up but there are a few commands that I'm unsure of. I'm using a Renishaw OMP40-2 in a DMG MORI NZX-2500 series horizontal lathe with a Fanuc controller.
Questions:
1) Since G53 is a one-shot command, is it even doing anything on a line by itself? Is there some reason the original programmer kept calling it?
2) The only thing that the MORI manual states about M2200 is "when stopping pre-read by NC intentionally, specify M2200 where pre-read needs to be stopped." I'm not sure what that implies...why is it called here?
3) I know from watching the program that the G10L52 command is writing to the N4077 parameter to rotate the spindle into a specific orientation, but how does this work? I was expecting to see a G420 C_ after the M19 call.
4) The interesting choice was made to use the MOD command to swap between M19 and M20. I don't understand why M20 is being used. Can I specify a reference position with M19 then use the G420 call as mentioned in question 3 instead?
Thanks for any input. I realize the code below is difficult to follow in its present state.
N100(START MEASUREMENT)
M88(SENSOR OFF)
G28U0
T0808
G0Z[#26-6.]
M53(SENSOR AIR ON)
G04X1.0
#731=4100/3
#732=1(COUNTER)
(///////////////////////////////)
G10L52
N4077P1R0
G11
G53
(///////////////////////////////)
(APPROACH)
M[[#732MOD2.]+19.]
M87(SENSOR-ON)
G0X118.
G31G98Z[#26+4.0]F100
G53
M2200
IF[#5042LT-6.5]THEN#3000=1(X/SKIP-SIGNAL-ON-BEFORE-APPROACH)
(G31G98Z[#26+3.]F500)
G53
M2200
IF[#5042EQ[#26-4.]]THEN#3000=1(X/NO-SKIP-SIGNAL)
G0W-3.
(MEASUREMENT START)
#737=-6.5(LEFT LOWEST Z)
WHILE[#732LE#19]DO1
M[[#732MOD2.]+19.]
G31G98Z[#26+4.]F100
IF[#5042EQ[#26-6.]]THEN#3000=1(X/NO-SKIP-SIGNAL)
G0W-3.
IF[#5062GT#737]THEN#737=#5062
(///////////////////////////////)
G10L52
N4077P1R[#731*#732]
G11
G53
(///////////////////////////////)
#732=#732+1
END1
(///////////////////////////////)
G10L52
N4077P1R0
G11
G53
Not a lathe guy, sorry, but I guess G53 is doing the same as your M2200 and inhibiting look-ahead to capture position values at correct time.
Can't help with the spindle orient question, maybe program was originally written with clever workaround for machine with no spindle orient option?
DP