Borrar filtros
Borrar filtros

How would I be able to code coordinates into a single set of instructions to direct the motion of the Delta X Robot?

1 visualización (últimos 30 días)
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')

Respuestas (1)

Walter Roberson
Walter Roberson el 2 de Feb. de 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);

Categorías

Más información sobre ROS Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by