Filter löschen
Filter löschen

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

4 Ansichten (letzte 30 Tage)
Dan am 8 Jun. 2017
Beantwortet: Dimitri MANKOV am 2 Dez. 2022
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?
  1 Kommentar
Abhisek Roy
Abhisek Roy am 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

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Dimitri MANKOV
Dimitri MANKOV am 2 Dez. 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!


Mehr zu Block Libraries finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by