The Project > Import PLCopenXML command allows you to import the content of an XML file describing objects in PLCopen format. You can create the file from a project by executing the Export PLCopenXML... command.
NOTE: If the import file, in addition to the basic information, contains the declarations (formatting and comments) in plain text (refer to PLCopenXML), the information given by the plain text overwrites that given by the regular format.
The command opens the Windows dialog box for browsing a file. The filter is automatically set to PLCopen xml files (*.xml). Select the desired file and confirm by clicking OK. The Import PLCopenXML dialog box will open. It provides two tabs: Contents and Additional Information.
Example of an Import PLCopenXML dialog box
Depending on the object currently selected in the navigators (Currently selected target object), this dialog box will only list those objects or entries from the XML file, which can be inserted at this position (Insertable items). You can select those that should be imported (as is possible due to the prescribed dependencies between certain object types) by setting or removing a checkmark in the box preceding the particular entry. The Select > and Deselect > button allows you to select all objects belonging to specific object types.
NOTE: The PLCopenXML schema does not allow having both VAR_GLOBAL and VAR_GLOBAL CONSTANT blocks in one variable list. If you have completed an export of such a mixed list, after reimport the VAR_GLOBAL CONSTANT variables will be defined as VAR_GLOBALS. In order to avoid this situation, you must separate the variables into two lists before exporting. See Export PLCopenXML....
After having selected the desired objects, confirm by clicking OK to allow the objects to be inserted in the project.
If there is already an object with the same name, a dialog box will display listing the necessary steps for instruction:
Rename the new object |
The object will be inserted below the existing one and will obtain a new name <name>_<n>, where n is a running number, which is 1 at the first import of a related object. Example: PLC_PRG -> PLC_PRG_1 |
Rename the new object. Do the same for all subsequent conflicts |
The renaming will be done as described above for Rename the new object for the current object and for all subsequent objects where the same conflict arises. |
Replace the existing object |
The existing object will be removed and replaced by the imported one. |
Replace the existing object. Do the same for all subsequent conflicts |
The replacement will be done as described above for Replace the existing object for the current object and for all subsequent objects where the same conflict arises. |
Skip the new object |
The object will not be imported. |
Skip the new object. Do the same for all subsequent conflicts |
The current object and all subsequent objects where the same conflict arises will not be imported. |
This tab shows the following information read from the file header and content header of the PLCopen XML file:
File header |
company name, company URL, product name, product version, product release, creation date/time, content description |
Content header |
name (project name), version, modification date/time, organization, author, language, comment |