Ax + by + c = 0, H = |ax, C|/(a – ElmoMC Multi-Axis Motion Controller-Maestro Motion Control User Manual
Page 30: A,b,c, R – r), H + r), 2rr + r, 2hr + r, 2r + 2h), Vse)

Motion Library Tutorial
Switch Radius Calculation
MAN-MLT (Ver 2.0)
2-9
The length of the perpendicular
h
should also be calculated. By knowing the line equation
in a form
Ax + By + C = 0
(2.2.1.1-3)
then
h
can be calculated by
h = |AX
c
+ BY
c
+ C|/(A
2
+ B
2
)
1/2
(2.2.1.1-4)
If line
L
is defined by its starting point
(X
1
,Y
1
)
and end point
(X
2
,Y
2
),
coefficients
A,B,C
can be calculated by formulas in Appendix 2 or Appendix 1.
To define
r
we can use an equation
(R – r)
2
= (h + r)
2
+
u
2
(2.2.1.1-5)
R
2
– 2Rr + r
2
= h
2
+ 2hr + r
2
+ u
2
(2.2.1.1-6)
r
max
=
(R
2
– h
2
– u
2
)/(2R + 2h)
(2.2.1.1-7)
This means that the parameter vsr that defines switch arc radius must obey the following
constraints:
(vse)
2
/vac
< vsr < (R
2
– h
2
– u
2
)/(2R + 2h)
(2.2.1.1-8)
The switch arc with parameter vsr calculated by (2.2.1.1-7) takes up the whole line segment.
To satisfy additional requirement that switch arc cannot take more than 50% of the segment
length instead of the line end point we should use in calculations some other point
P
2
′
that
belongs to the line segment. The distance between this point and the intersection point
ρ
2 =
ρ(P
i
,P
2
)
must be
equal
k*l
(where k <
0.5 , l
– the length of the line).
If the distance from the
intersection point Pi to P
1
is defined as
ρ(P
i
P
1
),
then (2.2.1.1-7) can be presented as a
function of the used partial length k*l of the line L.
r
max
=
[R
2
– h
2
– (ρ(P
i
P
1
) – k*l)
2
]/(2R + 2h)
(2.2.1.1-9)
Example 2-4
(
Motion Mathematic Lib Samples
\Circle to Line\ Section 2_2_1_1\
CircleLine_Ex_2_4 – www.elmomc.com)
Circle arc (Figure 2-4) is defined by its init position X
from
= 0, Y
from
= 0, radius R = 100000,
init angle α = –90
o
(with axis X positive direction), and sweep angle = +60
o
. Line end
point X
to
= 25000, Y
to
= 50000. Circle end point [Xc + Rcos(-30), Yc + Rsin(-30)] = (86603,
50000) so the line L is parallel to the axis X. From Figure 2-4, h = 50000, u = 25000. The
switch radius is calculated by (2.2.1.1-7).
r
= 0.5*(
100000
2
–
50000
2
–
25000
2
)
/
(100000 + 50000)
=
22917