send text(M1_RIGHT) to usb

1 次查看(过去 30 天)
hi, I want to start a motor with usb driver that I made it, it works when I send text with Bascom but with matlab dose not work; this is my m file that i write for start motor: s=serial('COM2') fopen(s) fprintf(s,'M1_RIGHT') what can I do?

采纳的回答

Walter Roberson
Walter Roberson 2013-5-5
You probably need to set the speed; you might also need to set the line terminator.
  2 个评论
mo ma
mo ma 2013-5-6
I write this command s = serial('COM2', 'BaudRate', 2400, 'DataBits',8,'Parity','None','Stopbit',1); but it does not work!!!
Walter Roberson
Walter Roberson 2013-5-6
Is there an error message?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Motor Drives 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by