Problem in serial communication between Simulink and Arduino

조회 수: 7 (최근 30일)
Valerio
Valerio 2012년 2월 19일
Hi everybody! I really need your help!
I'm trying to redo the same project that has been done here:
I've done exactly the same steps and replied the configuration and settings in my model but I got the following bad result:
I receive the serial signal only when the servo is not linked to arduino board. When I link it the serial communication stops suddenly; if i try to connect the servo before running the communication on the host side it gives me an error saying that the selected port is not available and occupied by other application (so in this way the communication doesn't start at all).
When i connect the servo it doesn't follow the sine wave signal but it starts to do very little movements in a cyclic way; it seems that it countinously connect and disconnect itself by the board (i can also hear the windows audio signal that there is when you connect and disconnect a usb device). I've tried to disconnect Arduino from the PC and connecting it to a battery but nothing changed.
Have you any idea about this problem? I really need your help; i can't understand where is the mistake.
Thank you for all you could do for me.
VZ

답변 (2개)

Kaustubha Govind
Kaustubha Govind 2012년 2월 24일
Your best bet might be to contact the author of the block library - in this case, Matt Bilsky I guess? Also, this paragraph makes me think that the Servo Motor is reserving the serial port for communication, so you cannot open another connection to it:
"I receive the serial signal only when the servo is not linked to arduino board. When I link it the serial communication stops suddenly; if i try to connect the servo before running the communication on the host side it gives me an error saying that the selected port is not available and occupied by other application (so in this way the communication doesn't start at all)."

Massimiliano Curzi
Massimiliano Curzi 2012년 4월 9일
try connecting the Board to an external power supply: I had your same issue with the servos making the board disconnect and reconnect continuosly and i solved by connecting my arduino to an external power supply

카테고리

Help CenterFile Exchange에서 Run on Target Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by