Date: Dec 5, 2012 10:37 AM
Author: Nikita Visnevski
Subject: Using UDP in an S-Fcn on xPC target

I was wondering if anybody was able to implement a udp protocol in an S-Fcn on the xPC target?  My understanding is that it is very non-trivial, but clearly possible since Mathworks provides both UDP and Real-time UDP blocksets for use with xPC target.  I use these blocksets at the moment.  I do whatever I need to do in an S-fcn, and then pipe its outputs in Simulink to a Real-time UDP block.

Ideally, I would like to just send stuff over UDP directly out of my S-Fcn. This will allow me to transmit data in a separate thread, or over multiple ethernet adapters.

I cannot obviously use standard win32 libraries to implement udp since they require winsock.dll (or ws_32.dll) to be loaded to the xPC target, which is not supported.

Anybody knows of an approach? Any help is appreciated.