Importing and exporting XML files
General requirements
- You have selected a library.
- You have selected a project.
- You have selected a configurator.
- You have opened the Configure and generate selection area.
Structural requirements
The XML file must have specific structure elements so that it can be used in the Project Builder.
Basic structure elements
Basic structure elements | Meaning |
---|---|
|
Identifies the XML file as a configuration file. All the information must be located within this structure element. The name of the configurator element to be used in the |
|
Identifies the block that contains the information on all the configuration variables of an element. |
|
Includes the name and the value for a certain configuration variable. The exact designation of the configuration variable must be entered as the name. The value to be defined must be available for selection in the variable and fit the data type. The order of the variables is of no significance. |
Example: Basic structure of an XML file
<Configuration typical="XML_IMPORT">
<ConfigurationVariables>
<ConfigurationVariable name="OP_Measuring_Transformer">true</ConfigurationVariable>
<ConfigurationVariable name="SE_Light_power">true</ConfigurationVariable>
<ConfigurationVariable name="SE_Receptacles_power">2</ConfigurationVariable>
<ConfigurationVariable name="SE_Light_control">true</ConfigurationVariable>
<ConfigurationVariable name="SE_Receptacles_control">2</ConfigurationVariable>
<ConfigurationVariable name="OP_Control_panel">false</ConfigurationVariable>
<ConfigurationVariable name="OP_Panel_Enclosure">true</ConfigurationVariable>
<ConfigurationVariable name="OP_Panel_Control">false</ConfigurationVariable>
<ConfigurationVariable name="SE_Drive_Transport">Frequency Control</ConfigurationVariable>
<ConfigurationVariable name="SE_Method">Electric</ConfigurationVariable>
</ConfigurationVariables>
</Configuration>
Structure elements for instances
Structure elements for instances | Meaning |
---|---|
|
Identifies the block which includes the information on all the instances of one element to be configured. The exact designation of the element to be configured must be entered as a name. |
|
Identifies the block which represents an individual instance. If an instance contains configuration variables, they are defined with a subordinate basic structure element |
Example: Structure of an XML file for the configuration of instances
<Configuration typical="XML_IMPORT">
<TypicalInstance name="Conveyor" >
<Instance>
<ConfigurationVariables>
<ConfigurationVariable name="parameter1">some string .... 1</ConfigurationVariable>
<ConfigurationVariable name="parameter2">1234</ConfigurationVariable>
</ConfigurationVariables>
</Instance>
<Instance>
<ConfigurationVariables>
<ConfigurationVariable name="parameter1">some string .... 2</ConfigurationVariable>
<ConfigurationVariable name="parameter2">5678</ConfigurationVariable>
</ConfigurationVariables>
</Instance>
<Instance>
<ConfigurationVariables>
<ConfigurationVariable name="parameter1">some string .... 3</ConfigurationVariable>
<ConfigurationVariable name="parameter2">9012</ConfigurationVariable>
</ConfigurationVariables>
</Instance>
<Instance>
<ConfigurationVariables>
<ConfigurationVariable name="parameter1">some string .... 4</ConfigurationVariable>
<ConfigurationVariable name="parameter2">3456</ConfigurationVariable>
</ConfigurationVariables>
</Instance>
</TypicalInstance>
<TypicalInstance name="Enclosure" >
...
</TypicalInstance>
</Configuration>
Export a configuration as an XML file
- In the selection area, click Export as XML.
- Enter the name and a storage location.
- Click Save.
- The configuration is exported as an XML file.
Import a configuration as an XML file
- Click Import XML file in the selection area.
- Select a file.
- Click Open.
- The configuration is imported.
Note
- The specifications in the XML file for designation, type and value of a configuration variable must match the elements in the selected configurator. If the specifications do not match, you receive a corresponding error message. The import will continue if possible.
- The specifications that were already made in the configurator and are not contained in the file to be imported also remain after the import.