Simulink 中的直接接口通信
在 Simulink® 模型中发送和接收数据
Instrument Control Toolbox™ 提供用于与仪器通信以及使用 Simulink 中的串行、TCP/IP 和 UDP 接口的模块。下面列出了 Instrument Control Toolbox 模块库中的模块以及如何使用它们的示例。
模块
Serial Configuration | Configure parameters for serial port |
Serial Receive | Receive binary data over serial port |
Serial Send | Send binary data over serial port |
TCP/IP Receive | 通过 TCP/IP 网络从指定的远程机器接收数据 |
TCP/IP Send | Send data over TCP/IP network to specified remote machine |
UDP Receive | Receive data over UDP network from specified remote machine |
UDP Send | Send data over UDP network to specified remote machine |
VISA | Communicate with VISA resources (自 R2023b 起) |
主题
- Open Instrument Control Toolbox Block Library
Access the Instrument Control Toolbox block library in two ways.
- Send and Receive Data over TCP/IP Network
Send data to an echo server using TCP/IP and read that data back into a model.
- Enable Blocking Mode in Receive and Send Blocks
Make your simulation wait while the block receives or sends data.
- Timing in Hardware Interface Models
Determine block execution frequency and relate to real-world time.