Siemens SINUMERIK 808D ADVANCED Commissioning Manual page 312

Hide thumbs Also See for SINUMERIK 808D ADVANCED:
Table of Contents

Advertisement

Tag identifier
LET Continued
LET Continued
MSG
312
Meaning
Variable type struct:
This variable type contains a composition of variables that can be addressed using the
structure name. A structure can contain all variable types and structures.
Within the structure, a variable is declared with the "element" tag. The attributes of the
tags and the initialization correspond to the attributes and initialization of the let instruc-
tion.
<let name="name" type="struct">
<element name="<Name>" type="<Variable type>" />
...
...
...
</let>
Access to a variable of the structure is via the structure name and variable name. Both
names are separated by a point operator.
<op>
Structure_name.variable_name = value;
</op>
Example:
<let name="info" type="struct">
<element name="id" type="int" />
<element name="name" type="string" />
<element name="phone" type="string" />
</let>
<op>
info.id = 1;
info.name = _T"my name";
info.phone
= _T"0034 45634";
</op>
Initialization of structures:
Structures can be initialized when the variables are created by specifying an initial value
for each structure element. In an array of structures, each structure must be separated
from the others by braces.
The operator component shows the message which is indicated in the tag.
Example:
<MSG text ="my message" />
Commissioning Manual
01/2017

Advertisement

Table of Contents
loading

Table of Contents