send text(M1_RIGHT) to usb

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 日

0 投票

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 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by