Aim: Tool Program:: To Obtain D-K Analysis of A 4 Axis SCARA Robot.: Matlab
Aim: Tool Program:: To Obtain D-K Analysis of A 4 Axis SCARA Robot.: Matlab
TOOL : Matlab.
PROGRAM :
clc;
p = [1 0 0 0; 0 1 0 0 ; 0 0 1 0; 0 0 0 1];
for i=1:4
x = input('theta :');
y = input('alpha :');
m = input('a :');
n = input('dk : ');
a = [cosd(x) -sind(x)*cosd(y) sind(x)*sind(y) cosd(x)*m;
sind(x) cosd(x)*cosd(y) -cosd(x)*sind(y) sind(x)*m;
0 sind(y) cosd(y) n;
0 0 0 1]
p = p*a;
end
disp('translation in x direction :');
disp(p(1,4));
disp('translation in y direction :');
disp(p(2,4));
disp('translation in z direction :');
disp(p(3,4));
disp('Normal Vector :');
X = [p(1,1);
p(2,1);
p(3,1)]
disp('Sliding Vector :');
Y = [p(2,1);
p(2,2);
p(2,3)]
disp('Approach Vector :');
Z = [p(3,1);
p(3,2);
p(3,3)]
OUTPUT :
theta :45
alpha :180
a :425
dk : 877
a =
0.7071
0.7071
0
0
0.7071
-0.7071
0
0
0
0
-1.0000
0
300.5204
300.5204
877.0000
1.0000
theta :-60
alpha :0
a :375
dk : 0
a =
0.5000
-0.8660
0
0
0.8660
0.5000
0
0
0 187.5000
0 -324.7595
1.0000
0
0
1.0000
theta :0
alpha :0
a :0
dk : 120
a =
1
0
0
0
0
1
0
0
0
0
1
0
0
0
120
1
-1
0
0
0
0
0
1
0
0
0
200
1
theta :90
alpha :0
a :0
dk : 200
a =
0
1
0
0
(ARM Matrix) p =
0.9659
0.2588
0
0
0.2588
-0.9659
0
0
0
0
-1.0000
0
203.4632
662.7426
557.0000
1.0000
translation in x direction :
203.4632
translation in y direction :
662.7426
translation in z direction :
557
Normal Vector :
X =
0.9659
0.2588
0
Sliding Vector :
Y =
0.2588
-0.9659
0
Approach Vector :
Z =
0
0
-1