Gallery, Projects and General > How do I??
Maths help please: Approximating a Flat Iteratively
Archie Opteryx:
This is getting very strange :bang:
One of the odd things is that the curve in your latest photo doesn't seem to be symmetrical - it's deeper on the left. Since you are stepping from 0 to 80, with a cosine offset of 40, it should be the same on both sides of the centre angle, whatever the actual shape of the curve. Is the cutter at centre height?
I don't know if your controller has any debugging facilities, but it would be nice to check what some of the variables are actually doing.
In your earlier post, you provided a table of X vs A values. Would it be possible to do the same for values of R10 (spindle angle) and R4 (the final X value)?
This will probably turn out to be something quite simple, but it may take some tracking down. :scratch:
Archie Opteryx:
Silly idea coming up...
I've just been staring at the code to see if I can see anything that would make the cosine term asymmetrical. When you made the first flat (albeit in the wrong place), you subtracted a constant value of 30 from the angle R10. The corresponding line now uses a variable:
N0135 R17= R10-R11/2 (offset angle value)
Is it possible that the controller is interpreting this as
R17 = (R10-R11)/2
ie doing the operations in strict order instead of using the normal arithmetic conventions? Surely not. But it would give a lopsided cosine function which might account for the asymmetric curve.
Perhaps it would be worth replacing R11/2 with 40, just to rule that out.
Clutching at straws, I know. :scratch:
awemawson:
Not a silly idea at all, and I will try it out - at the moment my head is spinning staring at your original .png image of the issue. What is clear to me looking at the drawing, the centre of the end mill MUST be programmed not the cutting edge or the maths won't work.
Give me an hour or so and I'll be back :clap:
But meanwhile look at this excel spread sheet that is giving odd results :scratch:
It is an XLS file but renamed to be able to be uploaded
awemawson:
OK there was a copy / paste error in the spreadsheet where excel had adjusted references :bang:
Corrected version attached again its an XLS file renamed as txt
Archie Opteryx:
Yes, you're right. :thumbup: The calculations are all based on the centre of the cutter, so tool corrections must be turned off. If you need to make a correction for actual cutter diameter, you need to change the value of R14 in the code.
The spreadsheet values look fine to me.
BTW, I don't know if you've come across the method of making absolute references by putting $ signs in front of the row and/or column labels (eg $C$2 and $C$3), but it can save a lot of time. If you enter
=(($C$2/2)+($C$3/2))/C6
in the top cell (D6), you can copy and paste it into the rest of the cells in that column. The C6 references will be modified appropriately, but the C2 and C3 references will stay the same.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version