Gallery, Projects and General > How do I??
Maths help please: Approximating a Flat Iteratively
<< < (9/13) > >>
Archie Opteryx:

--- Quote ---Theoretically it's always working in diameter mode
--- End quote ---

OK, I hadn't realised that. The answer is just to double the X values, of course. Alternatively, you could use the values for cutter diameter and AF distance (R14 and R15) instead of their half values (R5 and R16). This will have the same effect and save a couple of variables and a couple of lines of program.

The angle span of +/- 30 degrees is OK for hexagons, but a bit small for flats, and will leave material at the end of each flat. You can use the spreadsheet I posted earlier to calculate exact values, but a value of +/- 40 degrees (span, R11=80) should be a good default and will work in most situations.
awemawson:
OK a few more tests this morning:

Cutter compensation is not working as I'd expected for this end mill. As Archie observed when it was at a supposedly safe distance of 35 mm  with zero X tool compensation I'd expected its centre to be at 35 mm, so with 25 mm stock a clearance of 5mm. In fact it was taking a light cut. Now actually the stock is 1" or 25.4 mm and it's taking that 0.4 mm off.  So 25.0 plus 5 (half cutter diam) mean that the centre of the cutter is actually at 30 mm but no where in the compensation table is it told that the diameter is 10 mm so what the heck is going on.

Just to check my sanity I selected Tool #1 whose compensation values have been set in the old fashioned way of turning a diameter and measuring it so I know it's right. Telling it to go to 25.4 mm in X sure enough it's bang on the periphery of the stock.

So back to the Tool #9 compensation values : I decided to treat it like a lathe tool, set the stock and cutter both spinning and took a light cut and used the inbuilt compensation facility to transfer the measured diameter to the tool compensation table. As I would have expected the value now was very close to 1/2 of 120 mm at 4.910 mm defining the cutting periphery of the tool not it's centre. So why the heck when the compensation value was zero was it not putting the axis of the tool on position? Something very odd.

However now the positioning system is placing the cutting edge and not the tool centre tool diameter is I assume no longer relevant :scratch:

So, but Archie please confirm, I can drop the R term entirely and as we are working to diameters use the whole AF size rather than half of it  :scratch:
awemawson:
OK That didn't work   :bugeye:


I've lost the nice flat (all be it displaced) and got an unwanted curve  :ddb:


Archie Opteryx:
Andrew, you still need the R term to make the calculations work.

I suspect tool compensation is a red herring. The tool originally just touched the surface of the stock (taking off 0.4mm) when X was set to 35mm. This is what you'd expect if X is in diameter mode, since 35/2 = 25/2 (stock radius) + 10/2 (cutter radius)

I've attached what I think your program should look like. I put your .jpg file though an OCR program and corrected all the conversion errors I could see, but there may still be some lurking (eg letter O vs zero), so beware.

Have a try and see what it does.
awemawson:
Many thanks for that Archie. I had to re-type it as there were various embedded characters that the controller objected to but I attach a .JPG and a text file of what I used.

All I changed was the R1 stand clear location which isn't used in the calculations, and the Z position to actually cut metal.

Initially I ran it with the tool offset still with an X value of 4.91 but there was no cutting, so I set it back to zero and ran it again and I'm afraid we are still getting a curve as per the picture.

There may be some confusion regarding the diameter mode. If X is commanded to go to (say) X=35 the currently selected tool is moved so that it's tip (taking into account length compensation) will cut a diameter of 35 mm so yes it's really gone to 35/2 = 17.5 mm but the display will say 35.

With an end mill that is axially mounted it's axis when the tool carrier is moved to X=0 should be co-axial with the spindle axis of rotation, (there may be a very small error but we are talking .01 mm or so) So with zero X compensation the centre line of the end mill is programmed,  but for this nominal 10 mm cutter, with 4.910 X compensation brings the cutting periphery nearest the spindle centre to be the programmed point.

(I hope that wasn't too confusing  :scratch:)
Navigation
Message Index
Next page
Previous page

Go to full version