このページは機械翻訳を使用して翻訳されました。最新版の英語を参照するには、ここをクリックします。
TCP/IP インターフェース
伝送制御プロトコル (TCP) は、インターネット プロトコル (IP) の上に階層化されたトランスポート プロトコルであり、最もよく使用されるネットワーク プロトコルの 1 つです。Instrument Control Toolbox™ の TCP/IP 通信サポートには、クライアントとサーバーを作成する機能が含まれています。TCP/IP クライアント サポートにより、ネットワーク ソケット通信を使用して MATLAB® からリモート ホストに接続し、バイナリ データと ASCII データの両方を読み書きできるようになります。TCP/IP サーバー サポートにより、MATLAB と単一のクライアント間の通信用のネットワーク ソケットを作成できます。
tcpclient
を使用して、サーバーまたはハードウェアに接続し、読み取りおよび書き込み操作を実行する TCP/IP クライアントを作成します。tcpserver
を使用して TCP/IP サーバーを作成します。
関数
アプリ
TCP/IP Explorer | Connect to and communicate with TCP/IP server (R2021b 以降) |
ブロック
TCP/IP Receive | 指定されたリモートマシンからTCP/IPネットワーク経由でデータを受信します |
TCP/IP Send | Send data over TCP/IP network to specified remote machine |
トピック
TCP/IP通信
- 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 and UDP Comparison
Compare the TCP/IP and UDP protocols to determine which to use.
TCP/IP クライアント
- Create TCP/IP Client and Configure Settings
Connect to remote hosts or hardware from MATLAB for reading and writing data over TCP/IP. - Write and Read Data over TCP/IP Interface
Write and read data to and from the remote host connected to thetcpclient
object. - Use Callbacks for TCP/IP Communication
Enhance TCP/IP communication by executing a callback function when a specified event occurs. - Transition Your Code to tcpclient Interface
Create TCP/IP client connections usingtcpclient
instead oftcpip
.
TCP/IP サーバー
- Communicate Using TCP/IP Server Sockets
Communicate between a client and MATLAB, or between two instances of MATLAB. - Transition Your Code to tcpserver Interface
Create TCP/IP server connections usingtcpserver
instead oftcpip
.
TCP/IP エクスプローラー アプリ
- Configure Connection in TCP/IP Explorer
Specify the server to connect to in the TCP/IP Explorer app.
トラブルシューティング
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.
Troubleshooting TCP/IP Server Interface
Troubleshoot the TCP/IP server interface.
Resolve TCP/IP Server Connection Errors
Troubleshoot creating a TCP/IP server.
Resolve TCP/IP Server Warning: Unable to Read Any Data
Troubleshoot when you receive some data and you get the warning message: 'tcpserver' unable to read any data.
Resolve TCP/IP Server Warning: Unable to Read All Data
Troubleshoot when you receive some data and you get the warning message: 'tcpserver' unable to read all requested data.