如何从twincat保存.mat数据?

问题描述

我正在使用以下模型对twincat进行实时控制。我无法在文件夹中获取.mat文件。在twincat环境中,我已将对象链接到tcextendedfilewriter。我可以从工作空间中获取数据,但是无法在外部模式下保存来自twincat的数据。

如何直接在外部模式下从twincat保存.mat文件?

enter image description here

解决方法

假设您使用 TwinCAT3 Target for Simulink,您可以根据 Beckhoff 的 manual 设置 [_.-] 。第 8.4 节介绍了“ToFile”块的使用。

确保您检查的是正确路径:.mat 文件将在运行时 PC 上创建,而不是在开发 PC 上创建。

另外,请注意 TcExtendedFileWriter 对象有一个暂停输入,您需要将其设置为 TcExtendedFilewriter 以启用日志记录。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...