%% Basic UDP Communication
% This example shows how to transfer data over the UDP network using Simulink(R).
%
% Instrument Control Toolbox(TM) provides Simulink(R) blocks for sending and
% receiving data over TCP/IP and UDP networks. This example uses the UDP Send 
% and Receive block to perform data transfer over a UDP network. 
%
% This example requires Simulink to open and run the model. 

%%

% Copyright 2007-2012 The MathWorks, Inc.

%% 
%
open_system('demoinstrsl_udpcommunication');

%%
% 
close_system('demoinstrsl_udpcommunication');

%% Setup
% The input signal sent to the UDP Send block is a sine wave of frequency
% 1 radians/second. The UDP Send and Receive blocks use the 'localhost' for 
% transferring data across two different ports. The port selected for
% the two UDP blocks are 51000 and 51001. 

%% Result
% The resulting sine wave is seen in the scope block connected to the UDP
% Receive block. 
%
% <<../demoinstrsl_udpcommunication_02.png>>
%
% In this example, the UDP Send and Receive blocks exist in the same 
% Simulink model and are run on the same machine. However, you can also use 
% the UDP Send and Receive blocks in two different models and communicate 
% across two different machines.
