From: Ray H. <re...@up...> - 2004-05-23 14:42:31
|
Tom (comments mixed in) Tom Hubin wrote: >Hello Ray, > >Thanx for taking the time to work through the G92 stuff with me. >=20 > =20 > >>In theory, and if you run several of these kinds of tool changes in a >>row, the g92 should be able to handle the task. The only issue that >>you'll run up against is just what you did in this example. The z axis >>will work for each tool just the way you expect but the actual z will >>creep all over the place. In the sample, you would eventually run out >>of shank to grip one or another of the tools because z just steps up >>each round. >> =20 >> > >I think my program's problem occurs when the M02 is encountered. You >mention that in your paper on G92 quirks. > =20 > M02 is supposed to suspend the application of g92 offset values but it=20 does not remove them from the EMC's world model. It should be roughly=20 equivalent to the command g92.2. The actual addition of the offsets=20 happens the next time g92 is encountered at the start of the next run. >I cannot tell if your paper is suggesting that G92 is implemented >incorrectly or that its use is so obtuse or misunderstood as to render >it useless. > =20 > Actually, and it is a long story that I'll not repeat here much of=20 here. The action of g92 seems to have changed a bit when we switched=20 from a three axis interpreter to a six axis interpreter. Those changes=20 along with quite a bit of heated discussion caused me to write that=20 paper. My intent was to test the commands and report results under=20 certain specific conditions. It was not to place blame or to recommend=20 that folk not use these commands -- rather that they understand what=20 will result if they do use it in specific situations.=20 The use that you are making of g92 is probably the best case that I can=20 think of for using it. Most of the folk were using it as simply a way=20 to set part zero in some fixed location relative to their stock. This=20 can be as easily, or more easily done with g10 (see notes below) or with=20 the graphical offset pages. The results of this kind of offset are more=20 predictable. Issue a g55 at the start of a block of code and you will=20 get those offsets. Issue g54 at the end and they will go away. =20 Coordinate values set with the graphical pages will persist from one run=20 to the next. Normal shutdown of the EMC will also write current values=20 to the var file correctly. Let's look for a moment at the code that you posted at the start of this=20 thread in order to sort out how g92 is working for you. I've run this=20 code quite a bit so I think I understand what is happening. I'll repeat=20 a part of your post then so that we get back to where we were. ---snippet from earlier post Hello, The program below fails and I don't know why. I have run this on the Sherline metric step version and the non Sherline simulator that was supplied on the Sherline CD. As it finishes executing the G03 at the end of the program, the Z value changes for no apparent reason. The only legitimate values for Z in this program are 0 (after G92 Z 0) and +0.040 (after G00 Z +0.040). Each time the program is run the faulty Z value doubles. This doubling of Z also shows up in the backplot. Run the program 6 or 8 times while backplotting. I have not tried it without backplotting. *********************************** ( File: path01.ngc Tom Hubin 21 May 2004 ) ( cut mast hole out of 3x4x3/8 inch aluminum plate ) ( ref [right,rear,top] =3D [0,0,0] ) M0 (Load 5/32 inch endmill and touch surface) G92 Z 0 (z=3D0 at top surface) G00 Z +0.040 (raise the bit) M0 (Tighten bit and start spindle) G40 (tool radius comp off) G20 (inches) G90 (absolute) G00 X-0.3956 Y-1.5500 G03 X-0.3456 Y-1.5500 I0.0250 J0 F1 (entry arc) G01 X-0.3456 Y-1.3319 F10 ... G01 X-0.3454 Y-1.6362 G01 X-0.3456 Y-1.4500 G03 X-0.3956 Y-1.4500 I-0.0250 J0 F1 (exit arc) M2 You'll see that you set the value of g92 to zero at line 2. Then you=20 raise the bit by 0.04 and run the entire program. That means that at=20 the end of the run (m2) you are at +0.040. The next time you run, it=20 reads the m0, lets you load the tool. You're +0.04 now so you clamp a=20 bit higher on the tool because you never commanded the axis back down. =20 When you press resume, the g92 line takes over and sets current position=20 to zero and raises the spindle another 0.04, runs the program and drops=20 the g92 just like the instructions say it will. Now the display reads=20 0.080 and the next loop will set that value as the g92 offset. You've=20 built a ladder because you do not command the spindle back down. I would presume that when you really run this code, you would command a=20 -z value and dig out some material and then command it back to zero or=20 whatever offset you had done with the g92 before it hits the end or=20 before you start running again.=20 G92 is one of very few ways to poll current axis values and use them=20 while running a program. It is this ability that allows you to set tool=20 tip location during a program for multiple tools. I'd suggest that you=20 try wrapping each tool change, and the code affected by that tool change=20 in explicit g92 --- g92.1 commands and see if it meets your needs. >>A g10 would allow you to do a similar thing with the ordinary coordinat= e >>systems but as long as you are aware of the g92 quirks you should be in >>good shape. >> =20 >> > >No info in the Handbook on G10 usage. What does G10 do and how would I >use it to set the value of z? > =20 > I read again the info I have on G10 and it sets origins to specific=20 values but not based on current axis position. It does it for absolute=20 position. I'll include Tom's notes below. snipped from RS274NGC----- To set the coordinate values for the origin of a coordinate system,=20 program G10 L2 P - X- Y- Z- A- B- C-, where the P number must evaluate=20 to an integer in the range 1 to 9 (corresponding to G54 to G59.3) and=20 all axis words are optional. The coordinates of the origin of the=20 coordinate system specified by the P number are reset to the coordinate=20 values given (in terms of the absolute coordinate system). Only those=20 coordinates for which an axis word is included on the line will be reset. It is an error if: =B7 the P number does not evaluate to an integer in the range 1 to 9. If origin offsets (made by G92 or G92.3) were in effect before G10 is=20 used, they will continue to be in effect afterwards. The coordinate system whose origin is set by a G10 command may be active=20 or inactive at the time the G10 is executed. Example: G10 L2 P1 x 3.5 y 17.2 sets the origin of the first coordinate=20 system (the one selected by G54) to a point where X is 3.5 and Y is 17.2=20 (in absolute coordinates). The Z coordinate of the origin (and the=20 coordinates for any rotational axes) are whatever those coordinates of=20 the origin were before the line was executed. -----end Hope this helps. Ray |