| Contents | Index |
xPC Target Library for UDP
The Send block has one input port, which receives the uint8 vector that is sent as a UDP packet.
Regardless of the data type of the data being sent, you must supply a byte stream (represented as a uint8 vector) to the Send block. Use the UDP Pack block to convert from the signal data type to a single vector of uint8 values. See the UDP Data Streaming Demo for a demonstration of how to use the UDP Pack block to convert your data to a uint8 vector.

Specify the IP address to send the packet. Enter a valid IP address as a dotted decimal string. For example, 10.10.10.3. You can also use a MATLAB expression that returns a valid IP address as a string.
Specify the port to which to send the packet. This value must match the IP port to receive from parameter of the UDP Receive block
Set this parameter to -1 (default) to allow the networking stack to automatically determine the local IP port that is used for sending. Otherwise, specify a particular port to send a packet from that port.
Select this check box to enable the sending of variable length messages. Selecting this check box enables a second input port.
The width of the first signal entering the first input port specifies the maximum length of the input message. If this check box is selected, the first input port receives the actual data, and the second input port receives the actual length of the message.
If this check box is cleared, the block sends all the data each time.
You can set this parameter to -1 for an inheritable sample time, but you should set this parameter to some specific (large) value to eliminate chances of dropped packets. This is especially true when you are using a small base sample time.

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |