To declare variables using the declaration editor, follow the procedure below. Variables can also be declared very comfortably in the POU body (using LD/FBD, ST/IL or SFC) or in the Variables pane.
- Open POU header from Project pane
- Under Class, select a variable class
- Under Identifier, enter a symbolic name
- Under Type, select to open the Type selection dialog
- Under Type class, select the desired data type class
- Elementary data types
- Data unit types
- Function blocks
- Under Library, select the desired library
- OK
The initial value preset for the selected data type is displayed automatically. You can change this value at any time.
Optional: Under Comment, enter a text, if desired