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

5 ビュー (過去 30 日間)
Dan
Dan 2017 年 6 月 8 日
回答済み: Dimitri MANKOV 2022 年 12 月 2 日
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 件のコメント
Abhisek Roy
Abhisek Roy 2017 年 6 月 16 日
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

サインインしてコメントする。

回答 (1 件)

Dimitri MANKOV
Dimitri MANKOV 2022 年 12 月 2 日
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

カテゴリ

Help Center および File ExchangeBlock Libraries についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by