How do I import an XML generated by PLC coder into TwinCAT 3 / Visual Studio 2015?
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 7 Mai 2018
Réponse apportée : MathWorks Support Team
le 7 Mai 2018
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?
Réponse acceptée
MathWorks Support Team
le 7 Mai 2018
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with Simulink PLC Coder dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!