> > > ------------------------------ > > Message: 8 > Date: Sat, 6 Oct 2007 10:27:46 -0500 > From: Chris Radek <[EMAIL PROTECTED]> > Subject: Re: [Emc-users] 5 axis tool length compensation > To: "Enhanced Machine Controller (EMC)" > <[email protected]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=us-ascii > > On Sat, Oct 06, 2007 at 09:55:21AM -0500, Stuart Stevenson wrote: > > > I need to implement 5 axis tool length compensation. The > > calculation is simple. Would the implementation be better in EMC or > > HAL? > > Tool length compensation is currently in the canon level, which is > between the interpreter and the rest of EMC proper. There are > currently X and Z offsets and these are simply added to the number > the interpreter asks for when it parses a line of gcode. For > example if the interpreter wants a traverse to Z=1 and the Z tool > offset is 1, the canon level translates this to Z=2 and sends it on > to the rest of EMC. > > Adding length compensation in this style for the rest of the axes is > not too hard, only tedious. It touches many levels of the code from > the tool table (whose format would have to change again) through the > guis (some of which show these values when you load a tool).
I don't believe the tool table would have to change. The only thing it should have to provide is the tool length, It already does. > > However the big question in my mind is whether this is what 5 axis > tool length compensation even means. Is it this straightforward? Yes, it is that straightforward > In a 3 axis mill or a 2 axis lathe, the compensated axes are > independent/orthogonal so it's easy to see how to offset them (you > only do the addition I described above.) > > Is it like this for the general 5 axis case? Is there even a general > 5 axis case since 5 axis machines come in so many configurations? There is no general 5 axis case. Yes, there are many types. 3 axis and 5 axis tool length compensation are misnomers. If there are no rotary axes mounted on the Z axis, then no multi axis compensation is necessary, single axis compensation will do. If the machine is a normal three axis machine ie: X linear, Y linear and Z linear then the tool axis compensation is applied to 1 axis, usually the Z axis. If the Z axis has 1 rotary axis then two axis compensation is necessary, either X and Z or Y and Z. This depends upon the orientation of the rotary axis mounted on the Z axis. This would be called 4 axis compensation but in reality it would be 2 linear axis compensation. If the Z axis has two rotary axes mounted on it then 3 axis (X, Y and Z) compensation is necessary. This is called 5 axis compensation but it is actually 3 axis compensation. If the Z axis is carried by the rotary table or tables, no multiaxis compensation is necessary. Only when the Z axis carries the rotary table(s) is it necessary to implement multiaxis compensation. At most the X, Y and Z axes must be compensated for the different tool lengths mounted in the spindle. > > I don't have an understanding of how, in general, a 5 axis machine is > controlled/programmed at the gcode level. You've told me before > that short G1 moves are used in inverse time mode, which makes me > think the control really doesn't have to know much about the machine; > that specific knowledge about its configuration is left to the > programmer and/or CAM. How does length compensation fit into this > picture? The format of a multiaxis program depends on the kinematics of the machine tool. When the Z axis carries the rotary axis(axes) then the program invariably looks like this: X...... Y...... Z..... A..... B..... C..... X...... Y...... Z..... A..... B..... C..... X...... Y...... Z..... A..... B..... C..... the inclusion of A B or C is determined by the kinematics. The difference from line to line of the axis departure commands is usually very small. This will depend upon the contour the tool is to follow and the tolerance the CAM system used to calculate the interpolation and the tolerance used by the machine POST PROCESSOR in the CAM system. Many times, the difference between successive axis departure commands is less than .001. The machine moves in a linear (G01) mode for every line. Inverse time feedrate is the calculated feedrate that will cause each moving axis to arrive at the endpoint at the same time. The X, Y and Z commands in the program will reflect the position of the pivot point of the rotary axis(axes) mounted on the Z axis. The rotary position commands position the tool tip relative to the pivot point. The CAM system and POST PROCESSOR will use a pivot length AND a tool length to calculate the X, Y and Z positions. The summation of the pivot length and the tool length from the tool table represents the total distance from the pivot point to the tool tip. The reason to use the pivot length value and the tool length value is to allow the setting of the tool length using a measuring tool. The pivot length is usually the distance from the pivot point of the rotary axis(axes) and the gage point of the tool holder in the spindle taper. You can then use a measuring tool to determine the distance from the gage point to the tool tip. The calculation will use the desired tool tip location and the tool orientation (I, J, K of the tool axis vector) to determine the X, Y, Z, A, B and C commands for the program. This is all done in the CAM system. If I do not have 5 axis tool length compensation then I must set the tool length to an exact match of the tool length the program is calculated for. If I replace a dull cutter I must then again match the tool length. If, for some reason, I cannot match the tool length then I must change the tool length in the CAM system tool table and post the program for the new tool length and reload the program from the CAM system into the machine tool control. Hence, the desire to have 5 axis tool length compensation. You are correct when you say the control doesn't have to know much about the machine. You are correct when you say the programmer/CAM system must be configured to the kinematics of the machine. Tu implement 5 axis tool length compensation the machine tool control would have to understand (be told during integration) which axis(axes) to compensate and calculate the amount of compensation using the tool length in the tool table. This would then need to be added to the position commands for each linear axis in realtime (during the machining of the part). > > Chris > > > thanks Stuart ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
