TCP Send
Libraries:
Simulink Real-Time /
IP
Description
The TCP Send block sends data from a server application on a Speedgoat® target computer to a remote client device.
Examples
Target to Development Computer Communication by Using TCP
Use TCP blocks to send data from the target computer to MATLAB running on the development computer.
Ports
Input
Enable — Allow data transmission
integer
When Enable
> 0
, the block
attempts to transmit data to the remote
device.
As a best practice, connect the Status
output
of a TCP configure block to the Enable
input of
the associated TCP Send and TCP Receive blocks.
Data — Data to transmit over the TCP network
vector
Vector of Length
to transmit to the client
device.
Data Types: uint8
Length — Length of data vector
double
Number of uint8
values to transmit to the client
device.
Output
Status — Number of bytes sent
double
Returns the number of uint8
values transmitted to
the client
device.
Parameters
Send using — List of IP address and port pairs
x.x.x.x:y
This parameter is read-only.
The block receives the list of IP address and port pairs from the TCP configuration blocks in the model.
Ports 1
through 1023
and
5500
through 5560
are reserved for Simulink Real-Time
communications.
Programmatic Use
Block Parameter:
socketAddPort |
Sample time — Sample time of block
-1
(default) | numeric
Enter the base sample time or a multiple of the base sample time. -1
means
that the sample time is inherited.
Programmatic Use
Block Parameter:
sampleTime |
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2020b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)