Problem in serial communication between Simulink and Arduino

3 visualizaciones (últimos 30 días)
Valerio
Valerio el 19 de Feb. de 2012
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

Respuestas (2)

Kaustubha Govind
Kaustubha Govind el 24 de Feb. de 2012
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 el 9 de Abr. de 2012
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

Categorías

Más información sobre Arduino Hardware en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by