Declaration of a language element with partial address in ST
It is possible to define a not yet fully specified location (= a partial address) for the following language elements:
-
structure elements for a →structured data type
-
→variables of a specific section
Syntax |
---|
|
Meaning of the partial address and of the offset | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Use
Use the optional attribute
The optional attribute
|
The declaration of partial addresses is possible within these sections:
(Consult the respective description of the section about possibly additional possibilities for the variable.)
Section |
The declaration of the language element is done as: |
---|---|
|
internal variable (see "Declaration of internal variables in ST") |
|
input variable (see "Declaration of input variables in ST") |
|
output variable (see "Declaration of output variables in ST") |
|
global variable (see "Declaration of external variables in ST") |
|
temporary variable (see "Declaration of temporary variables in ST") |
|
→structured data type (see "Declaration of a data type in ST") |
A simple example with "OFFSET" |
---|
|
More complex examples with "OFFSET" |
---|
|
Example for a structured data type with different structure elements and the "SIZE" attribute |
---|
|