How to implement Ethernet Communication in Simulink Desktop Real-Time
25 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Chuguang Pan
am 4 Dez. 2023
Kommentiert: Chuguang Pan
am 6 Dez. 2023
I want to use Ethernet Communication within Simulink Desktop Real-Time. But I do not find corresponding I/O block in Simulink Desktop Real-Time Library. Should I use Stream Input and Stream Output Blocks?
0 Kommentare
Akzeptierte Antwort
Jan Houska
am 5 Dez. 2023
Hi Chuguang,
it depends on what you mean by Ethernet Communication. If you mean UDP or TCP/IP (which both often work over Ethernet), you can use either Packet Input/Packet Output blocks if your data is structured as messages of fixed size, in binary or text format. Or you can use Stream Input/Stream Output blocks if your data is a stream of messages, typically ASCII text. For any of these blocks, please select the appropriate protocol driver using the Install New Board button.
You can also take a look at the sldrtex_packetio and sldrtex_streamio shipping ewxamples that can give you an idea of the correct implementation.
Good Luck, Jan
2 Kommentare
Weitere Antworten (1)
Jan Houska
am 6 Dez. 2023
Hi Chuguang,
this means that you are using a very old version of MATLAB. TCP protocol support has been added in R2018a, almost six years ago. You should upgrade to at least R2018a to use TCP protocol.
Jan
Siehe auch
Kategorien
Mehr zu Model Preparation for Real-Time Simulation 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!