Thread: Co-ordinates
View Single Post
  #21   Report Post  
Posted to microsoft.public.excel.misc
[email protected] mahadevan.swamy@gmail.com is offline
external usenet poster
 
Posts: 59
Default Co-ordinates

Hi Bernie,

Any luck with the slots?

Thanks

Mahadevan Swamy


On Apr 14, 12:04 am, wrote:
Hi Bernie,

These are the conditions that I have for the sensor to read the
holes.

For the result of 0, I have SQRT((x2-x1)^2 + (y2-y1)^2) < abs(r2-r1)
---------------- (uncovered)

For result of X, I have SQRT((x2-x1)^2 + (y2-y1)^2) = abs(r2-r1)
--------------------- (touching from the inside)
AND SQRT((x2-x1)^2 + (y2-y1)^2) <= r1+r2 ----------------(Touching
from outside and partially blocked)

However, I have a small problem. When the edge of the hole is very
close to the sensor by 30 thou, it should be regarded as X (in other
words, it should not exceed 0.03 or else it would be a 1 or a 0
depending on whether the sensor in inside the hole or outside of it).
Can you suggest a solution for that? Thanks

Mahadevan

On Apr 11, 2:35 pm, wrote:

Hi Bernie,


Your condition: - SQRT(($B5-E$2)^2+($C5-E$3)^2) <= ABS($D5-E
$4),"Completely Overlapping". In this condition, you are saying if the
sensor touches the hole from the inside, then that is a 0 and in the
other condition, you are saying that if the sensor is touching the
egde of the hole then that would be an X (touching). For both of these
conditions, it should be an X. So my formula would be OR(IF(SQRT(($B5-E
$2)^2+($C5-E$3)^2) = ABS($D5-E$4),"X"), IF(SQRT(($B5-E$2)^2+($C5-E
$3)^2) = $D5+E$4,"X")). Is this right?


If the sensor is beyond the range of the circle, it would be SQRT((x2-
x1)^2+(y2-y1)^2) ABS(r2-r1). r2 is the radius of the sensor and r1 is
the radius of the hole. Do you agree?


How is the formula for the slot coming along? There are some
parameters that could be used for the calculation and they a angle
of the slot orientation, length from (0,0) to the end of the slot,
width of the slot and radius of the chamfer. For cast slot (the radius
of the chamfer would be a quarter of the circle and for machined slot,
the radius of chamfer would be 1/2 of the circle completely.


Thanks
Mahadevan Swamy


On Apr 8, 8:32 pm, "Bernie Deitrick" <deitbe @ consumer dot org
wrote:


Mahadevan,


Your logic won't work for rectangles (slots) that are not orthogonal to the
axes.


I will write a formula that uses Excel's FORECAST function to compute the
actual values of the slot's edges at the X and Ycoordinatesof the
sensor.... I've been meaning to do that, but I haven't had time.... so just
hang in there a bit...


Bernie


wrote in message


roups.com...
Hi Bernie,


This is the logic I have written for the slots being oriented at
different angles.
The way I have numbered is starting with the top right corner of the
rectangle and then top left corner of the rectangle.


Conditions for getting 0


For 0 < angle < 90,
x3<x<x2
y3<y<y2
x4<x<x1
y4<y<y1


For 90<angle<180
x1< x < x4
y4<y<y1
x2<x<x3
y3<y<y2


For 180<angle<270
x1<x<x4
y1<y<y4
x2<x<x3
y2<y<y3


For 270<angle<360
x4<x<x1
y1<y<y4
x2<x<x2
y2<y<y3


The two sets conditions are written for each angle if the sensor is
out of range for the circle and in the range of rectangle at two
places (left and right). In the data structure that you have given me,
I could put up a condition where if the row for slot is equal to 0,
then prevent executing the function that I have written for slot or
else if the sensor is in the range of the circle and rectangle, then
execute the conditions that I have given above. What is your
suggestion?


Thanks
Mahadevan Swamy


On Apr 4, 8:05 pm, wrote:


It can be easy to find thecoordinatesof the 4 corners of the
rectangle since I am given the angle in which the slot (center) is
oriented, the width of the slot and the radius of the slot (semi-
circle) from (0,0). Using cosine law, I can find thecoordinatesof
the corners of the rectangle. Assuming that I am given (x1,y1)......
(x4, y4) for the rectangle how am i going to use this info to see if
the sensor is in that area?


Thanks


Mahadevan Swamy


On Apr 4, 10:56 am, "Bernie Deitrick" <deitbe @ consumer dot org
wrote:


Mahadevan,


I think you would need the XYcoordinatesof the 4 courners of the slot.


Do you have that? Or perhaps we could derive it....


Bernie


wrote in message


oups.com...
I am also given the angle of slot orientation if that helps.


Mahadevan


On Mar 31, 2:28 pm, wrote:


The slot can be oriented anywhere on the part but it has two types as
I have described in my previous post. I am given the radius relative
to the origin for the first type of slot. This radius is the distance
from the orgin to the center of semi-circle. I have another
information which may or may not be useful. The mounting holes (small
holes outside bigger inner hole) has a center line radius measured
with respect to the origin and the slot cannot extend beyond this
radius (for the rectangle part). Small part of the semi-circle is
extended beyond this radius but I am not given the dimension of how
much it has been extended. This applies to both types of slot. I could
scan this picture and send it to you if you want. Thanks for your
assistance.


Mahadevan Swamy


On Mar 30, 4:58 pm, "Bernie Deitrick" <deitbe @ consumer dot org
wrote:


Mahadevan,


Does the slot have a specific orientation, relative to the origin?


HTH,
Bernie
MS Excel MVP


wrote in message


oups.com...
Hi Bernie,


I haven't told you about two design features (holes) of this part.
All
this time, we were discussing about parts having some small holes in
different locations and sensors reading them. The design feature I
haven't told you is that there is a bigger inner hole (pilot bore
hole) in the part and all the small holes (mounting holes, sensor
holes etc..) we were discussing about, are outside of this big hole.
This big hole has the coordinate (0,0,r) always. I have managed to
use
your formula for that kind of design and sensors will know whether
they are inside the big hole or outside of it.


The next design is a bit tricky. Some parts consists of this hole.
This hole is called a slot which is connected to the bigger inner
hole
(pilot bore hole). There are two kinds of slot. One kind of slot
looks
like a semi-circle and a rectangle together that is connected to the
pilot bore hole.If you want a picture of this, I can send it to you.
I
am given X, Y, and R coordinate of the semi-circle. I am also given
the absolute reference of this point. The other kind of slot looks
like a wide rectangle but is chamfered in the two corners. For this,
I
am given width of the rectangle, radius of the chamfer and distance
from the end of the slot to the orgin. I could consider these slots
as
a circle but some area of the hole is omitted which could result
giving wrong values for the sensor, if they are in that area. Is
there
a better formula to read these designs?


We will continue our discussion of creating a macro for this later
as
I am trying to work on this tricky problem. Thanks


Mahadevan Swamy


On Mar 29, 5:35 pm, "Bernie Deitrick" <deitbe @ consumer dot org
wrote:


Magadevan,


You could write a macro to take the values from a data table,
paste
them
into your worksheet with the formula table, do a calculation, then
copy the
results into another table. That way, you would not have a HUGE
workbook,
and the processing would be relatively quick.


Let me know if you want to do the macro. If you do, I would need
to
know
your data structure, and how you would want the resulting table
organized.
I would suggest three sheets: one for the data table, one for the
formula
table, and one for results, though all three could go onto one
sheet,
in
different areas.


HTH,
Bernie
MS Excel MVP


wrote in message


oups.com...
Hi Bernie,


Thanks a ton. I would appreciate your advise on how I can organize
my
data structure as I have to do the same thing for 1000 part
patterns.
I was hoping to create a function that can scan the part holeco-
ordinates(in one row) and then in another worksheet, report
what each
sensor got for the corresponding part number. Is there an easier
way
to summarize the sensor findings by performing all mathematical
calculations in one formula? Thanks for your help


Mahadevan Swamy


On Mar 28, 6:00 pm,


...

read more »