0

Is there an available library for reading/writing of Excel files, particularly XLSX or XLSM for TwinCAT 3? How about TDMS files? Obviously I'd prefer something open source and free, if available.

Thank you

busarider29
  • 185
  • 5
  • 18
  • 1
    I would suggest to use plain csv or write a separate service with higher-level language like C#/Javascript to handle Excel files. It most probably gets too complicated and you save lot's of time and money by doing that in some other environment than realtime system. – Quirzo Oct 20 '22 at 05:43

1 Answers1

0

Using TwinCAT you can make CSV files, JSON files, XML files. Next, after write files, you can use Python language to save data as excel files. There is some book for python called : "Automate the Boring Stuff with Python, 2nd Edition: Practical Programming for Total Beginners" There are some examples how to read write and modify Excel and Word files.

but remember that CSV can be opened in Excel using IMPORT or just using CTRL+C/CTRL+V. Delimiter in TwinCAT is located in Global variables - read about it in Beckhoff Information System (btw. google search works better and faster than Beckhoff's search on website) info about CSV function blocks from this page: https://infosys.beckhoff.com/content/1033/tcplclib_tc2_utilities/34977931.html?id=7903313200164417832

https://infosys.beckhoff.com/content/1033/tcplclib_tc2_utilities/34979467.html?id=1113952616781398655

Mirek
  • 13
  • 3