Can you please tell me how to combine these G-codes and be able to run Delta X Robot through MatLab program? Thanks.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
(X,Y,Z)
%แถวที่1
writeline(s,'G01 Z-390')
writeline(s,'G01 X-78 Y58')
writeline(s,'G01 X-55 Y58')
writeline(s,'G01 X-32.5 Y58')
writeline(s,'G01 X-11.5 Y58')
writeline(s,'G01 X12 Y58')
writeline(s,'G01 X34.5 Y58')
writeline(s,'G01 X57 Y58')
writeline(s,'G01 X80 Y58')
writeline(s,'G01 X103.5 Y58')
%แถวที่2
writeline(s,'G01 X-78 Y33')
writeline(s,'G01 X-55 Y33')
writeline(s,'G01 X-32.5 Y33')
writeline(s,'G01 X-11.5 Y33')
writeline(s,'G01 X12 Y33')
writeline(s,'G01 X34.5 Y33')
writeline(s,'G01 X57 Y33')
writeline(s,'G01 X80 Y33')
writeline(s,'G01 X103.5 Y33')
%แถวที่3
writeline(s,'G01 X-78 Y11.5')
writeline(s,'G01 X-55 Y11.5')
writeline(s,'G01 X-32.5 Y11.5')
writeline(s,'G01 X-11.5 Y11.5')
writeline(s,'G01 X12 Y11.5')
writeline(s,'G01 X34.5 Y11.5')
writeline(s,'G01 X57 Y11.5')
writeline(s,'G01 X80 Y11.5')
writeline(s,'G01 X103.5 Y11.5')
0 Kommentare
Antworten (1)
Walter Roberson
am 2 Feb. 2022
You can write the code more compactly;
coordinates = [
"Z-390", "X-78 Y58", "X-55 Y58", "X-32.5 Y58", "X-11.5 Y58", ...
"X12 Y58", "G01 X34.5 Y58", "G01 X57 Y58", ...
and so on
];
for K = 1 : length(coordinates)
writeline(s, "G01 " + coordinates(K));
end
1 Kommentar
Siehe auch
Kategorien
Mehr zu Robotics finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!