Hello Guest it is May 24, 2019, 05:39:55 AM

Author Topic: VB Script re G68 to edge find  (Read 7894 times)

0 Members and 1 Guest are viewing this topic.

Re: VB Script re G68 to edge find
« Reply #10 on: June 14, 2007, 11:09:41 PM »
I was taling to an OEM and I think it is time to add this to a plugin... It is just more then I think I would like to do in VB! It will require more math then anyone would think ;)

Thanks
and it should be soon...

Brian
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: VB Script re G68 to edge find
« Reply #11 on: June 14, 2007, 11:12:07 PM »
Im going over the math required and I just noticed i am VERY VERY rusty, this is high school stuff and i am having trouble figuring it out!

Ill give it a shot though, Brian, let me know if I can Help.
Regards
Fernando
Re: VB Script re G68 to edge find
« Reply #12 on: June 14, 2007, 11:15:19 PM »
The math for me is very simple... I will do it all with vector math, I have done all the math needed to solve the problem but the code is in Lcam :( I will just pull the code from Lcam and put it in the plugin... That should do it ;)
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: VB Script re G68 to edge find
« Reply #13 on: June 14, 2007, 11:26:19 PM »
Great!
I just figured the math out... took a little bit to get the gears on my head going. But you are right, it is very simple

A couple of Y=mX+b, then just find the intersection of both curves by making one equal to the other, and that point becomes 0,0. now basic trigonometry on one of the curves to get the angle of rotation and thats it.

Brian, can the plugin be made so that you can add a compensation if you are using a touchplate on the side of the piece?

Again let me know if i can help.
Regards
Fernando
Re: VB Script re G68 to edge find
« Reply #14 on: June 14, 2007, 11:32:05 PM »
it is not that simple :( You are better to get the vetor of the line ... after you have the vector you need to offset the points to the side that you get the 3rd point from. At this point I could add code to offset the dist of the plate and so on... I will be able to offset the Dia of the ball at the end of the probe.... I don't see a problem with all this!
Brian (I just need to get a better probe)
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com

vmax549

*
Re: VB Script re G68 to edge find
« Reply #15 on: June 15, 2007, 12:35:39 AM »
Brian do not forget the distance to trip allowance in the probe or your true 0,0 point will be off by that amount in x,y. With a $3k probe it may be in the millimicron amount but in a low end probe it is in the .005-7" range. (:-) I have been working on that very same problem with low end probe accuracy. Think I have it figured out now. repeats to .0002-5 accurate to .0005 with the proper TDA compensated for. Each probe can be different. I calibrated this one to calculate the allowance, if I change the stylus to a longer or shorter one the TDA changes.

Also take note that you need to do what ever you need to do with the g31 cycle before you rotate as it does not work once you have rotated with G68

(;-) TP
« Last Edit: June 15, 2007, 12:40:47 AM by vmax549 »