How do I send serial commands to a device with Simulink Real Time?

5 views (last 30 days)
I have a Speedgoat real time target machine and am trying to communicate with a Micro Maestro servo controller through Simulink Real Time. I've been using the setup outlined in the attached picture to test the software (I have a COM1 transmitting to COM2), but for some reason no data is coming across. Any thoughts?
Thanks
  1 Comment
Abhisek Roy
Abhisek Roy on 16 Jun 2017
Hi Dan,
In this kind of situation, I think we can do a loopback check with the RS232 card to check if the card is working properly or not. We have to also make sure that the baud rate for the receiving and transmitting blocks also match.
Hoping that the RS232 card is working properly, we have to check with the servo controller. Is it possible to tap into the Tx, Rx pins of the controller and see it in a oscilloscope? This way we will have another means of checking if the controller board is working as expected.
If above two checks are positive then I would suggest you to contact the Mathworks Technical Support team and get their opinion.
Regards, Abhisek

Sign in to comment.

Answers (1)

Dimitri MANKOV
Dimitri MANKOV on 2 Dec 2022
Hi Dan,
What kind of cable are you using to test this loopback model? Please note that a null-modem cable (or adaptor) must be used in such a scenario in order to connect the Tx pin of COM1 to the Rx pin of COM2, and vice-versa.
I hope this is helpful!
Dimitri

Community Treasure Hunt

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

Start Hunting!