主要内容

本页采用了机器翻译。点击此处可查看英文原文。

实时信号记录与流传输

通过信号记录或流式传输,可视化实时应用程序运行中的实时信号

要评估信号在实时应用程序中的行为,您可以向模型中添加仪表,调整参数并显示结果。

仪表包含以下信号:通过仿真数据检查器或 Simulink® Scope 模块标记用于可视化的信号、连接至 File Log 模块的信号,以及通过仪表对象连接至图形化仪表的信号。您可以在实时应用程序中通过使用 Simulink Real-Time™ Explorer 或 MATLAB® 语言来对信号进行监控。

使用仿真数据检查器调整标量、向量或矩阵参数,并以数字形式或带时间戳的轨迹形式查看信号值。要确定需要调整的参数或需要观察的信号,请浏览模型层次结构或创建参数和信号组。

设计并运行包含图形仪表的 App Designer 仪表板。当运行仪表板时,它会持续与实时应用程序交互,并更新相关的参数和信号。

App

Simulink Real-Time生成实时应用程序,用于在目标计算机上运行的仿真,并与目标计算机中的 I/O 设备进行交互。
Simulink Real-Time ExplorerInteract with target computer and real-time application running on target computer
Simulink Real-Time TET Monitor观察在目标计算机上运行的实时应用程序的任务执行时间
Simulink Real-Time App GeneratorGenerate instrument panel app to interact with target computer and real-time application running on target computer (自 R2022a 起)

工具

仿真数据检查器检查并比较数据与仿真结果,以验证和迭代模型设计

函数

slrtExplorer打开 Simulink Real-Time 资源管理器,并与目标计算机及实时应用程序进行交互
slrtTETMonitor打开 Simulink Real-Time 任务执行时间 (TET) 监控器
slrtAppGenerator生成仪表盘应用程序,用于与目标计算机及其上运行的实时应用程序进行交互。 (自 R2022a 起)
discardDelete file log data from target computer
getAllFileLogBlocks返回应用程序中与 File Log 模块对应的模块路径 (自 R2022a 起)
getFileLogDecimationReturns decimation value of File Log block based on block path (自 R2022a 起)
importImport file log data from target computer
list获取信号数据可用文件日志的相关信息
openImportDialog获取信号数据可用文件日志的相关信息 (自 R2023b 起)
setFileLogDecimationSets decimation value on File Log blocks based on block path and input decimation value (自 R2022a 起)
slrealtime.fileLogImportAfter copying file logs from the target computer to the development computer, import file logs into Simulation Data Inspector (自 R2021a 起)
slrealtime.fileLogListAfter copying file logs from the target computer to the development computer, list available file logs for import into Simulation Data Inspector (自 R2021a 起)
slrealtime.exportRunAccess data for Simulation Data Inspector run (自 R2023a 起)
startRecording启动信号数据实时流传输和文件日志记录 (自 R2022a 起)
stopRecording停止信号数据实时流传输和文件日志记录 (自 R2022a 起)

模块

File Log在目标计算机上写入信号数据文件日志
Enable File Log启用或禁用目标计算机上信号的文件日志记录

主题

背景

可视化信号

疑难解答

Simulink Real-Time 中的故障排除

在使用 Simulink Real-Time 产品时遇到的问题的故障排除

Troubleshoot Signals Not Accessible by Name

Investigate issues for some signal types prevent file logging or streaming.

精选示例