How would I be able to code coordinates into a single set of instructions to direct the motion of the Delta X Robot?
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Walter Roberson
2022 年 2 月 2 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Robotics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!