Technical data
Appendix
27.3 Data Types and Parameter Types
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 605
Temperature = 120
End = False
Saving and Accessing Data in Structures
You access the individual elements of a structure. You can use symbolic addresses (for example,
Stack_1.Temperature). You can, however, specify the absolute address at which the element is
located (example: if Stack_1 is located in DB20 starting at byte 0, the absolute address for amount
is DB20.DBW0 and the address for temperature is DB20.DBD6).
Using Structures as Parameters
You can transfer structures as parameters. If a parameter is declared as STRUCT in the variable
declaration, you must transfer a structure with the same components. An element of a structure
can, however, also be assigned to a parameter when you call a block providing the element of the
structure corresponds to the data type of the parameter.
If you use structures as parameters, both structures (for the formal parameters and the actual
parameters) must have the same components, in other words the same data types must be
arranged in the same order.