How would I be able to code coordinates into a single set of instructions to direct the motion of the Delta X Robot?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
s = serialport('COM5',115200,'Timeout',1,'DataBits',8,'StopBits',1,'Parity','none','FlowControl','none');
writeline(s,"IsDelta")
writeline(s,"IsDelta")
readline(s)
writeline(s,"G28")
writeline(s,'M204 2000')
readline(s)
s1={'G01'}
s11={' '}
s2={'Z','X','Y'}
s3={'-390','-78,-55,-32.5,-11.5,12,34.5,57,80,103.5','58'}
A = strcat(s1 ,s11,s2,s3)
writeline(s,'G01 A')
0 Kommentare
Antworten (1)
Walter Roberson
am 2 Feb. 2022
s = serialport('COM5',115200,'Timeout',1,'DataBits',8,'StopBits',1,'Parity','none','FlowControl','none');
cmd = "IsDelta" + newline + "IsDelta" + newline + "G28" + newline + "M204 2000" + newline;
s1={'G01'}
s11={' '}
s2={'Z','X','Y'}
s3={'-390','-78,-55,-32.5,-11.5,12,34.5,57,80,103.5','58'}
A = strcat(s1 ,s11,s2,s3)
cmd = cmd + A + newline;
write(s, cmd, 'char');
readline(s)
readline(s)
This is not certain to work. The robot might need time to react between the time you send IsDelta and the time you send G28, or after you send M204 and before the next part.
But possibly what you are looking for is just taking what you have now and replacing the
writeline(s,'G01 A')
with
writeline(s, A);
0 Kommentare
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!