Hello Guest it is April 18, 2024, 11:46:16 PM

Author Topic: TLO Woes  (Read 11834 times)

0 Members and 1 Guest are viewing this topic.

TLO Woes
« on: August 11, 2010, 11:48:22 AM »
Hi Dave,

Ran a simple program to see if two tools of different lengths will return to the Z 0 of the part. I used a touch plate and the TLO was saved in the tool table. When I ran program Tool #1 was above  part Z 0. When program called for Tool #2 it was at part Z 0. I put Tool #1 back in and switched to machine cord. and ran tool down to the TLO numbers in the tool table Tool 1 was at the top of the part. Did the same for Tool 2 same results. It seems that Mach 3 remembers the last tool Z zero. So if Tool #1 is 1.0 inches shorter than Tool #2 Tool #1 is 1.0 inches above the part. In MC go to tool offset length and both tool are on top of the part.  I've operared CNC equipment at my work and by changing from one tool to the other you can see the Z DRO going up or down according to the tool number and physical length of the tool .Is this a bug in Mach3 of am I doing something wrong? Using MSM Beta 4 and Mach3 R043.010
Thanks.

Eric
Re: TLO Woes
« Reply #1 on: August 11, 2010, 04:16:11 PM »
I don't think I understand what you are expecting to see happen.

The position of a Work Coordinate zero for any axis wrt to the machine axis coordinates is determined by the axis offset values (and maybe a G92 offset as well). The only way to move the WC origin is to change the WC offset values.

Changing a tool, will cause mach to use the TLO for the new tool (when TLO is active).
However, changing a tool does not change the location of the WC origin.
It sounds to me like you are expecting a tool change to move the WC origin - ?

To my knowledge, mach has never done that  (and this matches both my experience on other controls (primarily Haas) and the way g-code works in the books I've read (Ex: Smid, which is pretty much the Fanuc Bible)).

Perhaps you could give a detailed example of what you are expecting but not seeing?

Dave

Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com
Re: TLO Woes
« Reply #2 on: August 12, 2010, 11:31:14 AM »
Hi Dave

I did some playing around and found out I didn't have the G43 button pressed on the WC page. By pressing G43 and then G49 I am seeing part 0 in Z and TLO for tool change. That is what I expected see. Going to do some more testing as soon as I change the blown fuse on my Z axis. Don't ask what happened :D

Eric
Re: TLO Woes
« Reply #3 on: August 12, 2010, 05:02:36 PM »
Hi Dave

After further testing I'm more confused than before. TLO light was on and I zeroed Tool 1 and Tool 2 to top of part. Both had different offset numbers which is what I expected to see. Tool 1 is longer than Tool 2. I ran the following code.
%
M6T1
G0 Z.1
G0 X0
G0 Z0
G1 X3 F10
G0 Z5
M6T2  
G0 Z.1
G0 X0
G0 Z0
G1 X3 F10
G0 Z5
M30
Mach and MSM ran the whole program at the Tool 2 height because Tool 2 was the last one I set. When Tool 1 ran it was below the top of the part. Still the TLO light is on the whole time program ran. Now look at the next code I tested.
%
M6T1 G43
G0 Z.1
G0 X0
G0 Z0
G1 X3 F10
G0 Z5
M6T2 G43
G0 Z.1
G0 X0
G0 Z0
G1 X3 F10
G0 Z
M30
With G43 after every two change the offsets were correct. Tool 1 ran at the top of the part and Tool 2 ran at the top of the part. Is this supposed to be this way or is this a bug? My CAM software doesn't post a G43 after every tool change. Is it something I'm doing wrong or did I miss something? I can go back and edit every posted code but seems  tedious to me. Thanks for any insight.

Eric
Re: TLO Woes
« Reply #4 on: August 12, 2010, 05:32:34 PM »
Hi Eric,

I had a similar problem with the standard screenset and Mach version.

the problem appeared if the tool change call AND TLO call was on the same line.

I tested this and it was repeatable fault, if the coses were on one line.
So I always write the code like this

T1 M06
G43 L1

(Also I can't see where you call the actual TLO, I think there should be T1 M06 G43 L1 ( to tell mach which offset to use)



ATB
Derek

You can "chop it off" but can't "chop it on"
Re: TLO Woes
« Reply #5 on: August 12, 2010, 06:14:06 PM »
Hi Eric,

I really don't mean to be unhelpful, but this doesn't sound (yet) like an MSM issue....  ???
So the first comment is really a question:
Is MSM doing something with this Gcode that is different from what you experience when running the same gcode, with the same procedural steps, when using the 1024 screens?

I'm honestly not trying to be rude, it's just that the available time to support MSM comes from a limited amount of volunteer time that I have available - and that forces me to be sure that the topics I expend time on are indeed MSM problems.

OK, now that we have that out of the way.... ;)
Bear with me while I get a bit pedantic....

When you say "I zeroed Tool 1 and Tool 2 to top of part", I need to dissect that statement in order to understand it as it appears to me to imply a mixture of different concepts.

What does that phrase mean - precisely? what are you doing?
1) what TLO technique are you using (there are several described in the manual)?
Touching Tools to a part's top surface to set TLOs?

2) What does "..zeroed tool 1..." mean? Is it that you

a) touched the tip of tool #1 to the top of the part/stock, and then on the tooling page clicked "Set G-BLk TLO"?
(that action will set a TLO value for the currently mounted tool)

or does it mean

b) you touched the tip of tool #1 to the top of a part and then (on the WC OFfset - touch off page), clicked "Set Z Zero"?
(that action will set the WC Z Zero location). If this is the action you are doing, you are moving the WC Z Zero each time you do it... probably not what you intended to be doing.

or does it mean something else?

I'm asking because, when talking about "setting a zero", one is (well at least I am) generally referring to setting the zero location for a WC axis.   Thus I'm puzzled as I don't "Zero a tool", I set the TLO value for a tool.
Sorry, but getting to a common vocabulary is half the battle in doing tech topics over email or forum posts.

When Gcode does a tool change, the tool gets mounted in the spindle. The tool change action does not magically cause TLOS to be either applied or not applied.

The application of TLO values is done via Gcodes (the buttons in MSM literally issue GCode - that's one reason they are labeled G43 and G49 - makes it pretty obvious what they do).
In particular G43 typically turns on TLO compensation and G49 turns it off.
G43 is the g-code to tell a control to apply tool length offsets. Until you tell the control to use TLOs, it does not apply them.

BTW - It is not good form to program G43 by itself as that only gives the control part of the info it needs to apply TLOs. The G43 says "use a tool offset" - but what TLO value? Where is it? How does the control find the TLO value?
The actual offset value to be used has to be specified - the H word tells the control what offset value to use.

A common convention in gcode programs is to use the H# = the T#.
Mach V3 usually assumes H#=T# - but it not good practice to rely on that action (in fact doing so will get you in trouble with Mach3 V4 when Mach should finally, correctly handle H registers).

So, when I see G43, I automatically start looking for the H# that goes with it.... no H reg usually means "bad gocde" to me.

The typical 2 blocks (Lines) of code to change a tool and apply offset for the new tool is:
T1 M6   (Set next tool = #1, change tool to next tool#)
G43 H1   (turn on TLOs, and the TLO value to apply is in H register 1)

A really good book for these topics is Peter Smid's "CNC Programming Handbook".

Dave
« Last Edit: August 12, 2010, 06:16:44 PM by DaveCVI »
Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com
Re: TLO Woes
« Reply #6 on: August 13, 2010, 01:59:30 AM »
Hi Dave

Sorry for being such a bother. This will be my final post. Zeroed to top of part means that Tool 1 using a touch plate to set the TLO to the top of part by pushing the  Measure TLO button. Same procedure for Tool 2. I guess I don't understand the useage of the G43 command. I'll do some reading to educate my self. I didn't realize you had to had to use G43 after every tool change to apply the tool offset. I don't get the "H" command at all. I'll follow your advice and check out the CNC cook book site.
Thanks for the help.

Eric
Re: TLO Woes
« Reply #7 on: August 13, 2010, 02:04:11 AM »
Sorry Peter Smid's "CNC Programming Handbook. It's late.

Eric
Re: TLO Woes
« Reply #8 on: August 13, 2010, 12:49:59 PM »
Eric,
Please don't let that be your last post.
I just want to encourage people to always test a suspected symptom against 1024 as a first test for "is it a MSM issue or a mach  issue?".

Communication via email/posts can easily go off the rails - my apologies if it sounded as if don't want the questions. I really don't mean to discourage anyone from posting!  When I get rushed for time, my writing tends to get a bit terse - which ends up sounding harsher in writing than I meant it to.

If the question is not about an MSM bug issue, I'll usually still try to answer as I have time - it's just that my response time may be slower for general questions than for specific MSM issues.

Please do stay around. Having done the MSM software development, I am enjoying seeing how people use it.
No matter how hard I tried to make the interface intuitive, different people try different things that I would have thought of.
I like learning what people try to do - and it helps me find ways to make MSM better.

Re G43: What the concept of TLOs do is allow a gcode program to be written without the need to know the dimensions of the tool at the time the program is written. The programmer does not need to worry about if the tool crib has only 1" long or 2" long or other length 1/2" diameter end mill.

This means that before a gcode program is run, the operator has to teach teach the control the dimensions of the available tools. When the program is run, the control (Mach) uses the dimensions supplied by the operator, as called for by the program, to run the program.  Commercial controls have 2 sets of registers: one set for lengths (H registers) and one set for diameters (D registers).  The registers are accessed by number. Usually there are as many D and H registers as there are tool numbers (but this is not a gcode language requirement). The operator puts TLO values in H registers and Diameters in D registers.

A program can have the control (mach) adjust the position of the spindle vertically so that the tip of the tool is where the program wants it. Doing this is called Tool length compensation. Tool length compensation is turned on with G43 (there are other Tool comp gcode that are very seldom used, I'll ignore them for now) and off with G49.

So, when the gcode program says "G43", what TLO value should be used? That is determined by the H word. Think of the H# as a parameter to the G43 command. To change the amount TLO being applied, you should use G43 H#.  
An analogy might be a navigator giving a driver directions: Substitute "Turn" for G43 and "Left or Right" for H. If you tell a driver "Turn", they are likely to be much more confused than if you say "Turn Left".

The reason for a G43 after each tool change, is that there is a new tool mounted in the spindle by the tool change. Now the control needs to know what TLO value to use for the tool. Thus a G43 H# is required. Without that, the control does not know how to adjust the spindle Z position to put the tool tip at the desired WC Z position.

Now I'm going to confuse you a bit by explaining what Mach3 V3 and earlier does that is, well, frankly, screwed up - and has been fixed in V4...

Now, then, here is a key concept: Gcode does not require that the TLO for tool #5 be in H register #5.

Gcode lets you put any TLO, for any tool, in any H register.
it's not uncommon for multiple TLO values to be used with a single tool. For example, think of a slotting saw on a vertical mill - some operations will want to position the saw vie the upper face of the saw , and others via the lower face of the saw. This is done by changing the H register that the TLO value is taken from.

Mach will let you say G43 in a program without a H word in the block (Line) of code.
I believe that should be an gcode syntax error - because it's an ambiguous, incomplete preparatory command.

What M3V3 does is **assume** that the H# is implied and the implied H3=current T#. So if T7 is mounted, mach assumes the value is in "H7" and uses that TLO value.
Back to the driver analogy: It's the equivalent of saying "Turn!" and mach goes left.... even if the navigator meant to go right....

This is why you may see Mach3 gcode programs with only G43 on a line. It works, sometimes, and only in Mach3, but it is not good gcode programming practice to do this.

This implicit "help" from Mach may sound nice at first glance.. but the devil is in the details....

This has the effect of converting a **common convention** (many gcode programs use H#=T# as it's simple and easy to remember) into a  GCode syntax rule. This effectively change the definition of what the GCode command does.
What happens if you run a program where the gcode programmer used a convention where the TLO for T#n is in H#n+10?

FYI - Mach3 V4 has fully implemented D and H registers. The V4 version of the MSM tooling page has D and H register DROs.
Brain also tells me he used the Peter Smid book as the reference spec for how the implementation will work. This is why I recommend reading Smid - it will get one on the path to stay out of trouble then Mach3 V4 is released.

I'm hoping that this helps explain why I say that it's normal for each tool change to be followed by G43 H#.

Dave

Hi Dave

Sorry for being such a bother. This will be my final post. Zeroed to top of part means that Tool 1 using a touch plate to set the TLO to the top of part by pushing the  Measure TLO button. Same procedure for Tool 2. I guess I don't understand the useage of the G43 command. I'll do some reading to educate my self. I didn't realize you had to had to use G43 after every tool change to apply the tool offset. I don't get the "H" command at all. I'll follow your advice and check out the CNC cook book site.
Thanks for the help.

Eric
« Last Edit: August 13, 2010, 01:33:44 PM by DaveCVI »
Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com
Re: TLO Woes
« Reply #9 on: August 13, 2010, 01:20:26 PM »
Hi Dave

Thank you for all your time and energy trying to help me. Your last post helped. All the projects I have planned require at least 5 tool changes. I didn't know how to do the code and make it work with mutiple tool changes. What had me confused was how to get each tool into WC Z position. Your explaination was very eye opening. I ran my code with G43 H*
on the next line after the tool change code and it works. Thanks again.

Eric