Gallery, Projects and General > How do I??
Maths help please: Approximating a Flat Iteratively
awemawson:
:clap: :clap: Whoopee :clap: :clap:
We have a flat :thumbup: :thumbup:
Thanks Archie, and of course everyone else who contributed - what a result, but what a journey - I was running out of 1" bar :lol:
Yes the order of calculation MUST be strictly left to right and ignoring good old BODMAS
As for the intricacies of Excel I'm glad to say all my professional report writing and playing with spread sheets was over 15 years ago :)
Archie Opteryx:
Well done, Andrew. That's an excellent result :clap:
It's not surprising that the controller doesn't handle expressions fully. It's quite a tricky business https://en.wikipedia.org/wiki/Shunting-yard_algorithm and needs a lot of resources for a machine of that vintage. Hopefully the instructions warn you about this though.
According to the spreadsheet I posted earlier, the cusp height for the conditions you used should be between 0.038mm near the centre and 0.081mm near the edge. I don't know how that compares with the reality...
awemawson:
Archie I'm really chuffed :thumbup:
I did try setting the starting angle to 180 to do the 'other flat' of the spanner flats, but it faulted out saying a destination was beyond the soft limits. Not had time to trace what's happening but presumably the cos function isn't happy in that / those quadrants.
The finish to be honest is rather rough - the poor old end mill has been being used without coolant so that I could see what is happening, so it's not as sharp as it was!
However I did put a vernier guessing stick on the one flat and work out what the AF would have come out to and it's 18.02 mm so not to bad without any tweaking.
Many thanks for your help with this little conundrum .
Archie Opteryx:
It's probably not the cosine function itself that's unhappy, but rather that the cosine of 180 degrees is -1. Your X distance will therefore work out negative, which will probably make the tool try to emerge from the front of the cabinet :bugeye: Good for soft limits, eh?
You'll probably need to subtract an additional 180 degrees from the value you give to the cosine function.
It's good to know the dimensions are coming out as expected :D
PekkaNF:
Happy that you guys got it sorted very elegant.
These PLC controllers don't quite work as expected and sometimes even reading the programmer guide does to reveal all. I hope I never need to get too deep on them again. I remember few ocassion when same Siemes S5 machine code produced different results with different model CPU:s. I.E. the instruction was supported, but result was different. Once on night sift at the site the function call would return garbage (worked on the office with different CPU), tracking the error was not too easy and in the end we had to write subsitute function in ASM, because it was time critical. Brown pants moment. Felt really awkward. We did not want to rewrite the code (no-one wants fork), but sometimes you really have to get dirty to get system up and running. I think we ended up supporting internally two codes, because customer did not want to upgrade CPU (cost of spares and all).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version