What's new
What's new

Alarm 510 "X over travel", variables/macro statement causing a problem?

superrat

Plastic
Joined
Dec 2, 2006
Location
kansas city, mo
Hello all, I have an issue that I am chasing my tail on. Here are the specifics:
-Early 90’s Hwacheon lathe with Fanuc O control (Macros enabled)
This is a new program using a bar puller and loop statement to run “X” amount of parts at “X” length.
What happens is the program runs through, loops, pulls and counts all fine until it gets to the end of the program where it jumps to line N201 and should park at machine home. At this point it gives me an “Alarm 510- X overtravel”. If I press RESET and start from line N201 it goes home and all is good and we can start over.
It seems to me that I am inadvertently setting something or not clearing something before trying to execute the G28 U0. W0. but I am unable to locate it at this point. Any thoughts?

To clarify, the machine does not hit hard stop. After RESET I can jog X, clear the alarm and keep going.

I’m pretty green at the whole macro/variable programming, I’m definitely open to improvements.

Thank you.

Program:


%
O00001
(PROGRAM NAME - 2M SPACERS - PULLER - ALL LENGTHS)
(THIS WILL RUN AND KEEP COUNT OF PARTS RAN)
(START WITH LENGTH OF SPACER +.625 STICKING OUT OF JAWS)

(#500= # OF PARTS TO RUN)
(#501= PART LENGTH)
(#510 IS PART COUNTER ONLY- DO NOT CHANGE )
(#510 RESETS AT M30)

(T0101 WNMG 432)
(T0505 .118 GROOVE)
(T0909 1.0 BORING BAR)
(T0707 1.625 PULLER)

N100 (***PROGRAM MINUS BAR PULLER BELOW HERE***)
G20 G99
( TOOL-1 OFFSET-1 WNMG432 )
G0 T0101
M42
G97 S1000 M03
G0 X1.825 Z.06 M8
G99 G1 X.9325 F.008
G0 Z.16
X1.825
Z.03
G1 X.9325
G0 Z.13
X1.825
Z0.
G1 X.9325
G0 Z.1
( TOOL-1 )
X1.4013
Z.0616
G1 X1.5427 Z-.0092
X1.7481 Z-.1119
X1.8895 Z-.0412
M9
G0 X8. Z 8.
M01

(TOOL - 9 OFFSET - 9)
(1.0 DIA. 2.5 LONG TPG322 INSERT - TNMG-432)
( TOOL-9 )
G0 T0909
G97 S1100 M03
G0 X1.3487 Z.0616 M8
G1 X1.2073 Z-.0092 F.008
X1.125 Z-.0503
Z-[#501+.178]
Z.0
G0 Z.1
M9
G0 X8.Z8.
M01
(TOOL - 5 OFFSET - 5)
(.118 GROOVE TOOL INSERT - GC-4125)
( TOOL-5 OFFSET-5 .118 OD GROOVE )
G0 T0505
G97 S500 M03
G0 X1.825 Z-[#501+.118] M8
G1 X1.6 F.002
X1.61
X1.5
X1.51
X1.4
X1.41
G0 X1.825
Z-[#501+.078]
X1.645
G1 X1.595 Z-[#501+.118]
X1.3
X1.31
X1.2
X1.21
X1.15
X1.16
S250M3
X1.06 F.001
G0 X1.825
M9
G00 X8. Z8.
M01 (END OF PART PROGRAM)

#510= #510 + 1
IF [ #510 EQ #500 ] GOTO201

N101 (***BAR PULL BELOW HERE***)
(BAR PULLER)
G0T0707
M05
X0Z3.
Z-#501
G98Z-[#501+.25]F20.
M69
G98Z-0.062F10.(LEAVES APPROX .050 TO COME OFF FACE)
M68
G0Z3.
X4.Z8.
M01

IF [ #510 LT #500 ] GOTO100

N201
G20 (ADDED TO TRY TO FIX 510 ALARM)
G99 (ADDED TO TRY TO FIX 510 ALARM)
T0500 (ADDED TO TRY TO FIX 510 ALARM)
G28 U0. W0. (ALARMS HERE)
#510= 0
M30
%
 
Last edited:
I believe it needs to read G91G28U0.W0.. Thats how I have to write it on my machine

Hello tteitgen,
G91 only applies if G Code System B or C is applied to the machine. From the OP's code, it would seem that G Code System A is being used. Addresses U and W are the incremental equivalents of the Absolute X and Z addresses.

To superrat
Remove the code highlighted in Red shown below. This code will do nothing to resolve your issue and its poor practice to specify G20/G21 in any area of the program other than at the very start.

N201
G20 (ADDED TO TRY TO FIX 510 ALARM)
G99 (ADDED TO TRY TO FIX 510 ALARM)
T0500 (ADDED TO TRY TO FIX 510 ALARM)

G28 U0. W0. (ALARMS HERE)
#510= 0
M30
%
For the purpose of testing:
1. Either change parameter Bit 5 of Parameter 0011 to "1" so that Macro Statements can be executed in Single Block, or add an End Of Bock to the code as shown below; this will achieve the same result as changing Parameter Bit 0011.5

#510= #510 + 1
;
IF [ #510 EQ #500 ] GOTO201
;

2. Set Macro Variable #500 to 1 so that the program should branch to N210 after one part.

3. Turn ON the Optional Stop switch so that the program halts when "M01 (END OF PART PROGRAM)" executes.

4. Run the program in Fresh Air and apply the Single Block Switch after "M01 (END OF PART PROGRAM)" executes and continue to execute the program in Single Block Mode.

5. The Program should branch to N210 and execute the Reference Return in the X and Z axis.

6. Report back to the Forum if the 510 error was still raised.

Regards,

Bill
 
Hello Bill,

Thank you for your thoughts and solution. (I've read many of your posts and they are always very helpful) I added the EOB to the lines you specified and ran through in single block and in auto and it works perfectly! So now my question is why? Either way thank you for the help.
The lines you highlighted to remove were gone already, they were a shot in the dark trying to get it working.
--Phil
 








 
Back
Top