What's new
What's new

TL2 program driving me nuts

Nick Mueller

Titanium
Joined
Jun 12, 2006
Location
Munich / Germany
Hi!

I'm going nuts with a little program on the TL2. In graphics, it is running through without complains, in dry run it simply stops right behind the "hangs" comment. No move, no feed. Pressing cycle start (not required here, but despair) at that point it says "wait or reset".
Well OK, you are right, but then move, pleeeeeease!

Software is L0905E, I'm running in metric, lathe is with manual QCTP

You can assume the most dumbest error ever, but I simply don't see it.
Here's the code:
Code:
%
O00666 
(HOLESAW) 
G50 S2000 
G54 T4 G42 
G00 X31. 
G00 Z0. 
G96 S200 
M03 
G01 X-1. F0.08 
G00 Z0. X31. 
G71 P1 Q2 D1. I0.5 K0.5 U0.3 W0.3 F0.2 
N1 
G00 X15.8 Z0. 
G01 Z-12. 
N2 G01 X30.5 
G00 X31. Z0. 
G70 P1 Q2 F0.15 
(next line it hangs)
G00 X40. Z100. 
M05 
(THREAD) 
T5 
G96 S40 M03 
G00 X17. Z3. 
G99 G40 
G76 D0.2 X14.554 K0.658 P2 W-12. F1.411 
(DRILL) 
G00 Z200. 
X0. 
M05 T30 
G97 S1000 
G00 Z5. M03 
G83 F0.1 Z-30. Q3. R3. 
G80 
G00 Z100. 
M30 
%

Don't complain about the code, I made so many desperate changes.

Thanks,
Nick (I'll have one beer to many in the meantime)
 
Nick


Unlike the G71 cycle, G70 does not allow ( or more specifically ignores ) the F-command in the block itself.
What that means that you must put the F-code within the P-Q block.
In your case this should work:


G71 P1 Q2 D1. I0.5 K0.5 U0.3 W0.3 F0.2
N1 F0.15 ( <- added the feedrate here !!! )
G00 X15.8 Z0.
G01 Z-12.
N2 G01 X30.5
G00 X31. Z0.
G70 P1 Q2
(next line it hangs - should not anymore!!!)
G00 X40. Z100.
M05


It should also explain why the graphics didn't have any problem with it.
What IS a mystery however is that the control does NOT complain about no-feedrate.
I tought if a G01 is issued without a feedrate ( explicitly OR from a modal state ) the control throws an error "No Feedrate Commanded"
 
I was also going to suggest looking at the feed rate.
The machine won't alarm but just "sit there."
I've also had it happen when I forget a decimal point, like F100
The machine reads it as something like .0001 IPM and seems to be motionless.
 
Thank you guys.
I did as Seymour suggested, removed the F from the G70 line and moved it up to the N1. Tripple checked my double checks and ...
... in dry run the line G00 X40. Z100. is highlighted and nothing more happens. Dryrun speed is highest, spindel speed at 20%, single block off, control says feed is 0.15, ... machine pos doesn't move. Same of dryrun is off.

I'm quite convinced, that it must have to do something with the G70. Kind of not being properly terminated, control thinking that there remains something more to be done in the G70.

I'm really going nuts over that. I already updated from V8 to V9 because of that. Someone told me, that the V8.06B that was installed had that bug. Don't know. I spent too many days on that issue to be true.
Bear in mind, that this lathe is new to me. I only made a few simple parts that all worked. I checked *all* machine parameters manually and they are per factory printout.
The pre-owner is not accessible, the lathe is from a shop that went broke.

Is it possible that a setting is wrong? Machine is in FANUC-mode (and me in mad-mode). The beer didn't help either.


Thanks,
Nick
 
I found a cure!

I changed the line
G00 X40. Z100.
to
G40 G00 X40. Z100.

Could someone explain why it helped?


TIA,
Nick

Glad you found it.
I missed that you had turned on the comp, but I don't know why it wouldn't have given you a comp error or some alarm.
Only a guess, that it was still "searching" for its final destination.
I never encountered it before, probably because I don't use comp that often and when I do I just automatically turn it off if I turned it on within that tool.

Same reason that some of us (and most CAD/CAM software) always start a tool with something like
G90 G40 G98 (or G99)
no matter what.
Yes, it is redundant, but if you've ever done something temporarily in MDI mode, like gone in incremental or used an offset, if you tried to run a program without it, you'd be messed up.:(
 
Seems I have to "learn a bit more".
I'd like to find a book/article that talks about those patterns/good practice and explains the whys and don'ts.


Thanks,
Nick
 
Seems I have to "learn a bit more".
I'd like to find a book/article that talks about those patterns/good practice and explains the whys and don'ts.


Thanks,
Nick

It's no biggie, really.
Just look through your list of G codes, there's probably one on the console of the machine or in the manual.

G80 turns off canned cycles, G40 turns off comp, G90 is absolute mode that most of us run in and on a lathe G96 & G97 determines whether you want constant rpm's or constant surface speed. I've fogotten at the moment what G98 & G99 does.

Anyway, it's like checking the mirrors and gauges when you start your car before you put it in gear.
Maybe someone else just ran the machine before you did or maybe you're like me and don't always remember what you did since the last time you slept. :D
Maybe a little cautious, but it prevents a lot of "oops."
:cheers:
 
Herr Mueller! Dohhh!!!!! I've completely missed that G42 in the beginning.
What's really odd tough that the Graphics didn't throw an error!
I don't know the details of your sw version, but on mine ( V 4.something) the graphics will show really goofy movements if comp is not cancelled.
By goofy I mean goofy enough to be obvious just by looking at the backplot on the graphics screen.
On the newer ones I do believe there is an error something to the effect of Comp Active or or invalid command or similar.....

Haas doesn't care about comp on or off during a rapid move, it likes it either way and behaves properly. With that said tough, I typically like to move off comp and then back on in-between operations.
In your case I probably would write the code this way:


%
O00666
(HOLESAW)
G50 S2000
G54
G00 G97 T404 S400 M03
G00 X31.
G00 Z0.
G96 S200 M08
G01 X-1. F0.08 <--- NO NEED TO COMP, YOU'RE JUST FACING
G00 G42 X31. Z1. <--- PUT TOOL 1MM FROM FACE, COMP-ON
G71 P1 Q2 D1. I0.5 K0.5 U0.3 W0.3 F0.2
N1 G00 X15.8 <--- SINGLE AXIS MOVE FOR TYPE 1 CYCLE
G01 Z-12. F.15
N2 G01 X30.5
G00 X31. Z1. <-- NOT REALLY NEEDED, TOOL IS IN THIS POSITION ALREADY
G70 P1 Q2
G00 G40 X40. Z100. <--- MOVE AWAY TO TOOLCHANGE, COMP-OFF
M05
....
 
... or maybe you're like me and don't always remember what you did since the last time you slept.

<GGG> That's me.

Re the "pattern" thing:
"Patterns" has a special meaning amongst programmers (their brains get rearranged by time) and essentialy means something like "idioms", so patterns you use during daily conversation that everyone understands and is familiar with.
My brain is also of the programmers type, and it needs documented examples that show some context.
G-code is just an other programming language for me. I once counted how many I worked with, it were more than 20.

For me, the examples in the Haas manual look like a mess. I think its best if I restructure things to better fit my personal way of thinking. Means, develop my own proven patterns (code blocks) and partially write my own documentation.

I'll have a very close look at your suggestions you made! They are all welcome!


Nick
 








 
Back
Top