TCP/IP 通信
传输控制协议 (TCP) 是位于 Internet 协议 (IP) 上层的传输协议,并且是最常用的网络协议之一。利用 MATLAB® 对 TCP/IP 客户端通信的支持,您可以使用网络套接字通信从 MATLAB 连接到远程主机,以便读取和写入二进制和 ASCII 数据。
使用 tcpclient
创建用于连接到服务器或硬件并执行读写操作的 TCP/IP 客户端。
函数
App
TCP/IP 通信管理器 | Connect to and communicate with TCP/IP server |
硬件管理器 | Discover and get started with your hardware |
主题
- TCP/IP Communication Overview
Use network socket communication to connect to remote hosts from MATLAB for reading and writing data over TCP/IP.
- 创建 TCP/IP 客户端并配置设置
通过 TCP/IP 从 MATLAB 连接到远程主机或硬件以读取和写入数据。
- Use Callbacks for TCP/IP Communication
Enhance TCP/IP communication by executing a callback function when a specified event occurs.
- 通过 TCP/IP 接口写入和读取数据
在连接到
tcpclient
对象的远程主机中读写数据。 - Configure Connection in TCP/IP Explorer
Specify the server to connect to in the TCP/IP Explorer app.
- Get Started with Hardware Manager
Get the apps and add-ons to access your hardware from MATLAB.
疑难解答
Troubleshooting TCP/IP Client Interface
Troubleshoot the TCP/IP client interface.
Resolve TCP/IP Client Connection Errors
Troubleshoot creating a TCP/IP client.
Resolve TCP/IP Client Warning: Unable to Read Any Data
Troubleshoot when you receive no data and you get the warning message: 'tcpclient' unable to read any data.