Importing Types from IEC 61131-10 XML
PLCnext Engineer allows you to import IEC 61131-3-compliant program/function/function block POUs, data types, and global variables according to the IEC 61131-10 XML standard into your project.
You can either import POUs or data type worksheets via the context menu of the type folder in the COMPONENTS (for example, 'Data Types' or 'Programs' folder) or via the 'File > Import > Import From IEC 61131-10' command. In the second case, you can select which types you want to import.
Note
IEC 61131-10 XML files created with the 'File > Export > Export To IEC 61131-10' command cannot be imported via context menu. |
Further Info
See also the topic "Exporting Types to IEC 61131-10 XML". |
When importing an IEC 61131-10 XML file, the following applies:
- Tasks are imported to the ESM1 node in the 'Tasks and Events' editor of the PLCnext node.
- Data types and POUs are added to the 'Local' folder of the respective subcategory in the COMPONENTS area.If the imported POU has a description in Rich Text Format (RTF) but 'HTML' is set as default format of description for the project ('Extras > Options > Tool | Description') or vice versa, a warning appears in the error log indicating that the descriptions are possibly not converted.
- Types with the same name in the project are not imported.
- Variables are imported into the controller's data list. Connections are not imported.
- Safety POUs (from other providers) are imported into the non-safe (standard) controller project.
- If you import the XML file via 'File > Import > Import From IEC 61131-10' into an empty project (project does not contain a controller), the resource related elements such as tasks, variables, etc. will not be imported. A corresponding note is indicated in the import dialog.
- Manually created XML files (with a third-party tool) cannot be imported via context menu. These files must be imported via 'File > Import > Import From IEC 61131-10'.
- Messages about the import process are reported in the Project Log in the MESSAGES window. The log lists, for example, if types have not been imported because they are not supported in PLCnext Engineer (such as an unsupported programming language) or already exist or if imported graphical code could not be handled correctly.
Import IEC 61131-10 XML file via context menu
Select the 'Import from IEC 61131-10' context menu command from the 'Local | Types' folder (or any subfolder) in the COMPONENTS area, select the XML file to import, and then click the 'Open' button.
If the XML file consists of several types of different kind (e.g., data types, functions, FBs, etc.), the types are imported into the corresponding root folders (i.e., a program is imported into the 'Programs' folder, a function is imported into 'Functions & Function Blocks' folder, and so on).
Import IEC 61131-10 XML via 'File' menu
- Choose 'File > Import > Import From IEC 61131-10', select the XML file to import, and then click the 'Open' button.The 'Import from IEC 61131-10' dialog is displayed. The dialog displays information on the file version and its origin, date, etc. Verify this information to ensure that the correct file (version) is going to be imported.
- Optional: Check the option 'Convert LD/FBD to NOLD'. If checked, FBD/LD code worksheets are imported as NOLD code worksheets (network layout is arranged automatically and cannot be modified). If unchecked, FBD/LD code worksheets are imported unchanged from the original worksheet.
- Check the types to import and uncheck the types you want to exclude from the import, and then click 'OK'.
Note
Observe the dependencies of POUs when checking/unchecking. If, for example, a POU is imported which calls a function block that is not imported, the missing FB will cause a semantic error. - Consult the Project Log in the MESSAGES window for messages about the import process.
- Consult the Error List (MESSAGES window) for error messages (for example semantic errors due to missing POUs or invalid types).