Real Time UDP from xPC Target

조회 수: 6 (최근 30일)
Uladzimir
Uladzimir 2014년 3월 24일
댓글: Uladzimir 2014년 3월 25일
Hi ladies and gentlemen. Who knows the difference between UDP Binary and UDP real Time blocks? Is there any difference in the timing tolerance? I have the next problem: UDP binary blocks works properly, but Real time blocks don't. The hardware Ethernet PCI card Intel PRO 100 (ID 82559) is compatible with the real time target, according to Matlab Help. When I run the model with real time UDP blocks, it works, but nothing sends or receives. May be there is a problem with the "PCI slot" parameter of Network Configuration Block, because I don't know exactly, where can I find it. Everest Ultimate Edition shows: PCI bus #6, device #1. But device isn't a slot...? Thank you for attention

채택된 답변

Suneesh
Suneesh 2014년 3월 24일
The UDP binary blocks send UDP packets over the card that is used for host target comunication. This block is not a real-time block, which means that the block executes in a (non real-time) background task, sending out packets "when possible". If there is not enough processing time available for execution, then this block might not be executed.
Real-time UDP requires a dedicated Ethernet card. This block executes in hard real time. That is, the packets "have" to be sent as per the model design. Any reason not to execute this block due to processing time constraints will result in a CPU overload and target halt. The cards supported for this are a subset of the cards supported for host-target communication. See: http://www.mathworks.com/help/releases/R2014a/xpc/io_ref/model-based-ethernet-communications.html#brrdorh
To determine the correct PCI bus/slot for the card use the following host commands after booting up the target:
For release R2013b or before:
getxpcpci('all')
For R2014a onwards:
tg.getPCIInfo
where 'tg' is a target object created using
tg = slrt
  댓글 수: 3
Suneesh
Suneesh 2014년 3월 24일
Now that seems to be an issue with the target setup. Does XPCTEST run without failure? If it does not then there might be an issue with a certain 'EthernetIndex' parameter. If you only have 2 cards on the target then try:
1. setxpcenv('EthernetIndex','0') 2. Create boot image using what ever method youare using 3. Try XPCTEST and see if it passes 4. setxpcenv('EthernetIndex','1') 5. Create boot image using what ever method youare using 6. Try XPCTEST and see if it passes
If this doesn't work then: Tech Support
Uladzimir
Uladzimir 2014년 3월 25일
I have tried it, but have not reached a success. My "Target PC" is embedded system with ARM Cortex M3, connected to the PC with running MATLAB via UDP (lwip.h library is used). Microcontroller IP 192.168.2.83:3000 and it sends packets to the host 192.168.2.XXX:22222. Is boot image necessary?. I cannot get, how do I manage to boot M3 with "new kernel". Xpctest causes following messages: >> xpctest
### xPC Target v5.3 Test Suite ### Host-Target interface is: TCP/IP (Ethernet) ### Test 1, Ping target PC 'TargetPC1' using system ping: ... OK ### Test 2, Ping target PC 'TargetPC1' using xpctargetping: ... FAILED
System ping is OK, but xpctarget isn't. What is the correct response to xpctarget from the device? I was just sending short messages with 1ms interval to the host PC.
Command getxpcpci('all') causes following messages: Error using AutoConnect (line 17) Message: A connection attempt failed because from another computer in the required time did not properly respond, or was established connection due to an incorrect response already connected computer 192.168.2.83:3001 Source: System HelpLink: Connection is not established, since target machine refused it Again "did not properly respond". Do you know, what should be sent for "properly respond"?
It shows, that port is 3001, but I've input 3000. Anyway, input 2999 istead of 3000 doesn't help: Error using AutoConnect (line 17) Message: Connection is not established, since target machine refused it 192.168.2.83:3000 Source: System HelpLink:

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Development Computer Setup에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by