You can declare variables as either local in the declaration part of a POU or in a global variable list. The allowed location of a variable depends on its data type.
For more information, see: ⮫ “Access to Variables in Arrays, Structures, and Blocks ” and ⮫ “Bit Access in Variables ”