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 Exchange에서 Instrument Control Toolbox Supported Hardware에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by