MATLAB: Real Time UDP from xPC Target

#real time #xpc #udp #simulinksimulink

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

Best Answer

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