Declaration of global variables in ST
Syntax |
---|
|
Meaning | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
declaration of one or more →global variables,
The declaration of program-global variables is possible within an ST-object, in particular within the declaration of program. Access to such global variables is done in the context of other →POUs ( The declaration of resource-global variables or configuration-global variables is possible within a PLC-object, in particular within the declaration of a →resource or of a →configuration. Access to such global variables is done in the context of POUs ( The optional attributes Providing the optional keyword See "Supported data types" to learn which data types are supported for the declaration of variables. Use the optional →initial value [
Use the optional keyword Examples for physical addresses:
If you are using EtherCAT fieldbuses that can be addressed via →EC-Master and →EC-Engineer, see "Accessing hardware IOs via EC-Master and EC-Engineer of Acontis" for information on access of their hardware IOs. Necessary structure for physical address Enter a physical address according to this structure:
|
Good to know |
---|
Moreover, Neuron Power Engineer allows you to define a not yet fully specified location for the declaration. See "Declaration of a language element with partial address in ST" for details. Moreover, Neuron Power Engineer allows you to specify additional data for the declaration. See "Defining description, comment, JSON string or type for variables or data types" for details.
Within a section |
Example |
---|
|
Example for assigning a physical address |
---|
|