Editing variables as XML tags
You can describe variable using a simple XML structure, where each variable is described as an XML tag. The file must fit the baisc XML syntax. Values of tag attributes mus be entered between double quotes. Characters < > " ' & are reserved to XML and cannot appear in values of tag attributes. Instead you should use the following sequences:
Character |
Sequence |
< |
< |
> |
> |
" |
" |
' |
' |
& |
& |
Below is the tag structure for variable declaration:
<k5project>
|
+-<vargroup>
|
+-<var>*
|
+-<varinfo>*
(the "*" mark indicates that the tag can appear 0 or more times)
The rest of this page describes the format and meaning of each tag:
<k5project>
This tag must be entered at the top level and is unique. It is reserved for extensions (enhancement of the XML structure), and specifies the version of the syntax. Its attributes are:
Attribute |
Description |
version |
Reserved for future extensions. This attribute is mandatory and must be "1.0". |
The <K5Project> tag contains one <vargroup> tag.
<vargroup>
This tag must appear with the <K5Project>, and contains all <var> tags for variables of the group. In this version, the tag has no attribute (the name of the group is implicit).
<var>
This tag describes the basic definition of one variable. Its attributes are:
Attribute |
Description |
name |
Symbol of the variable. |
type |
Name of the data type of the variable. |
len |
Maximum length if the data type is STRING. |
dim |
Dimension(s) if the variable is an array. |
attr |
Attributes of the variable, separated by comas. Possible values are: |
init |
Initial value of the variable. |
The <var> tag contains zero or more <varinfo> tags.
<varinfo>
This tag indicates an additional info for the variable it belongs to. Its attributes are:
Attribute |
Description |
type |
Type of information contained in the data attribute. |
data |
Data specified y the type attribute, in text format. |
Editing variables as XML tags |
IEC 61131-3 Automation platform > IEC 61131-3 Programming Environment > Variable Editor > Editing variables as text > Editing variables as XML tags |
Created with the Personal Edition of HelpNDoc: Effortlessly Create Encrypted, Password-Protected PDFs