Real time Udp Send and Receive Block

조회 수: 9 (최근 30일)
Yavuzhan Erdem
Yavuzhan Erdem 2022년 7월 23일
댓글: Yavuzhan Erdem 2022년 8월 15일
I would like to send and receive data inside target computer(xpc target) by setting the Ip adresses of udp send and receive blocks as '127.0.0.1'. When I run the system as software in loop, It works.However, after compiled the model, that blocks didin't work. Is it possible to do that ? or Should I use different way to make it possible ?
  댓글 수: 2
Walter Roberson
Walter Roberson 2022년 7월 23일
편집: Walter Roberson 2022년 7월 23일
Could you confirm that you want the same xpc host to send and receive the data?
If I understand correctly, xpc requires a dedicated program running on a real-time operating system, so if I understand correctly, you cannot have two different programs running on the same xpc exchanging data. As such you are setting up a loopback. Is that your intention?
Yavuzhan Erdem
Yavuzhan Erdem 2022년 7월 25일
편집: Yavuzhan Erdem 2022년 7월 25일
Yes. Absolutely ,I would like to do that . To clarify , for example, I can use "goto-from" blocks to move a signal from a subsystem to another subsystem inside the same model, but at this time I would like to send data by using the udp send and receive block inside the same model instead of the goto block or signal. So that my udp sender and receiver will be in the same model for transferring data. Shortly,I don't want to have two different programs running on the same xpc.Only, I want to run a model which has udp send and receiver to move data inside model, on the same xpc.
Is it clear now?

댓글을 달려면 로그인하십시오.

답변 (1개)

Dimitri MANKOV
Dimitri MANKOV 2022년 7월 25일
Hi Yavuzhan,
You can achieve this by using the UDP Send and UDP Receive blocks from the Simulink Real-Time library (see here for examples in R2020a and earlier / here for R2020b and later). Please note that the UDP Send and UDP Receive blocks require the IP addresses of the corresponding Ethernet ports to be in different subnets.
If you're using MATLAB R2020b or later, these Ethernet ports should also be configured using the Speedgoat Ethernet Configuration tool before you deploy your model.
I hope this is helpful!
Dimitri
  댓글 수: 12
Walter Roberson
Walter Roberson 2022년 8월 15일
Sorry, I do not have anything resembling appropriate hardware to test this with, and I do not have access to the source code.
Yavuzhan Erdem
Yavuzhan Erdem 2022년 8월 15일
Thank you for your time and effort Walter!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Multicore Processor Targets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by