MATLAB Answers

Simulink with Modbus TCP in the Realtime Machine

17 ビュー (過去 30 日間)
Marlon Trujillo
Marlon Trujillo 2020 年 5 月 26 日
コメント済み: Fernando Liozzi 2020 年 9 月 10 日
I saw that there is no Modbus block in Simlunk, and checked the blocks of the Simulink Real Time and could not find it either. How we can create a model that uses modbus to comunicate to the controller if there is no Modbus compatibility in Simulink? The instrument toolbox only can use MATLAB and not Simulink, which I did not know when I bought it.....

  0 件のコメント

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

採用された回答

Diego Kuratli
Diego Kuratli 2020 年 6 月 7 日
Modbut TCP support for Simulink Real-Time requires a dedicated I/O module from Speedgoat, see:
The regular Ethernet ports on the target machine can be used for UDP/IP, TCP/IP, PTP, and EtherCAT Master only.

  0 件のコメント

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

その他の回答 (2 件)

Sai Sri Pathuri
Sai Sri Pathuri 2020 年 5 月 29 日
編集済み: Sai Sri Pathuri 2020 年 5 月 29 日
As a workaround, you may use a MATLAB Function block and use modbus object inside it.

  1 件のコメント

Marlon Trujillo
Marlon Trujillo 2020 年 6 月 1 日
Matlab functions should not be use it. We need to use interpreted ones. But this is not the answer for the real time topic.

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


Fernando Liozzi
Fernando Liozzi 2020 年 7 月 7 日
Hi, I need Simulink Modbus blocks for code generator,that is, generate code to implement modbus in microcontrollers, using simulink code generation., is this possible?
Thanks.

  2 件のコメント

Marlon Trujillo
Marlon Trujillo 2020 年 8 月 18 日
The thing is that Modbus directly is not available in Simulink for code generation... So, that sounds like is not possible.
There is a workaround I found for a "live simulation in simulink" using interpreted functions and calling them from Simulink... But you'll need to simulate in simulink, no to export code...
Fernando Liozzi
Fernando Liozzi 2020 年 9 月 10 日
Thank you very much for answering. I have already managed to port freemodbus 1.6 to all my microcontrollers, PIC18, dsPICs, Cortex M3 / M4.
Regards.
Fernando.

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

Community Treasure Hunt

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

Start Hunting!

Translated by