Manual editing of the variable XML file

Previous chapterNext chapter Show allShow all    Hide allHide all

attention Attention

External changing of XML files is recommended only for experts.
Erroneous imports can damage or destroy your project! We recommend to backup your project before making changes.

You can edit the XML file before the import and after the export with an external program.

The header definitions must contain the following attributes:

ShortName

Name of the variable

DriverID

ID of the driver
Please consider that the identification of every driver depends on the project. You can get the exact identification of the driver by creating a driver and an associated variable in your project and exporting it via XML.

TypeID

ID for the datatype
ATTENTION: the TYPEID also depends on the project. Please see the import for datatypes for details.

HWObjectType

Identification of the driver object type
The area on the PLC is defined here, e.g. data block area, marker area, input, output, etc.
Please consider that not every driver supports all object types. Please look at the documentation of the according driver to find out which driver supports which object types. The correct identifications are listed in the category tpKanaltypes in the VBA object catalogue.

HWObjectName

Name for the driver object type
Redundant information for the HWObjectType. This property only serves for informational purposes.

IsComplex

TRUE = Structure variable
FALSE = simple variable

Matrix

Name of the linked reaction matrix
This property is empty if no reaction matrix is linked.

3 Syntax examples for changing the XML file:

Example Example

1.

Creating a new variable during import

<Variable ShortName='WIZ_VAR_10' DriverID='4' TypeID='2' HWObjectType='8' HWObjectName='PLC marker' IsComplex='FALSE' Matrix=''>

 

2.

Deleting an existing variable during import

<Variable ShortName='WIZ_VAR_10' Delete='TRUE' DriverID='4' TypeID='2' HWObjectType='8' HWObjectName='PLC marker' IsComplex='FALSE' Matrix=''>

If the variable existed in the zenon project, you can delete it by using the attribute Delete.
Please make sure that the attribute is not empty. This means, it must contain e.g. 'TRUE' or 'FALSE'. The content of the entry is not evaluated in this case.

3.

Renaming an existing variable during import

<Variable ShortName='WIZ_VAR_10' Delete='TRUE' DriverID='4' TypeID='2' HWObjectType='8' HWObjectName='SPS-Merker' IsComplex='FALSE' Matrix='' NewName='Standard_1'>

When renaming, the variable is first imported and then renamed. This means you can make changes to the variable and at the same time rename it. If there is already a variable with the new name, renaming fails. An entry in the output window informs you about this.