How do I import an XML generated by PLC coder into TwinCAT 3 / Visual Studio 2015?
13 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2018 年 5 月 7 日
回答済み: MathWorks Support Team
2018 年 5 月 7 日
I am generating an XML using PLC Coder, and would like to import this XML into Beckhoff TwinCAT 3/Visual Studio 2015 (TwinCAT 3 is an add-on I have installed for Visual Studio, as shown in the image below).

Although I have my own model, I am currently working with a MathWorks example model, "plcdemo_external_symbols". I changed the "PLC Code Generation" configuration parameters of the model to have a Target IDE of "Beckhoff TwinCAT 3". I then generate the XML by right-clicking on the subsystem, and selecting "PLC Code > Generate Code for Subsystem". This generates "plcdemo_external_symbols.xml". When I try to import the XML, I am getting an error message saying it "cannot consume the specified XML. The XML content has no meaning for the tree item...".
How can I import my generated XML file into TwinCAT?
採用された回答
MathWorks Support Team
2018 年 5 月 7 日
The option being used to import the XML into TwinCat in the above screenshot is not intended for PLC XML. Instead, the generated XML can be imported into TwinCat/Visual Studio using the right-click context menu. In the Visual Studio solution window, right-click on the PLC project for which you want to import the code. Then, the context menu will show an option for "Import PLCopen XML". Select this option, and choose the XML file generated by Simulink in the file open dialog. You can read more about this import method in Beckhoff's online documentation, linked below.
infosys.beckhoff.com/english.php?content=../content/1033/tc3_plc_intro/2526208651.html&i
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with Simulink PLC Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!