0

I am using the below model for real-time control with twincat. I cannot get the .mat file in the folder. In the twincat environment, I have linked the object to the tcextendedfilewriter. I can obtain data from the workspace, but I cannot save data from twincat in external mode.

How can I save .mat files from twincat directly in external mode?

enter image description here

Adriaan
  • 17,741
  • 7
  • 42
  • 75
Eric
  • 1

1 Answers1

0

Assuming that you use TwinCAT3 Target for Simulink, you can set up the TcExtendedFileWriter according to the manual by Beckhoff. Section 8.4 covers using the "ToFile" block.

Make sure that you're checking the correct path: The .mat file will be created on the runtime PC, not the development PC.

Also, note that the TcExtendedFilewriter object has a Pause input, which you need to set to FALSE to enable logging.

lfs
  • 1
  • 2
  • This does not provide an answer to the question. You can [search for similar questions](https://stackoverflow.com/search), or refer to the related and linked questions on the right-hand side of the page to find an answer. If you have a related but different question, [ask a new question](https://stackoverflow.com/questions/ask), and include a link to this one to help provide context. See: [Ask questions, get answers, no distractions](https://stackoverflow.com/tour) – phoenixstudio Jan 29 '21 at 01:47