Skip to main content

Object: POU Locations

This object is available only for specific controllers. It is displayed automatically in the device tree. The object cannot be added or removed manually.

The object can be used for mapping the executable code of an application in different code areas on the controller. Specifically small controllers often have limited internal code areas (flash memory). If one or more additional code areas (for example, external flash memory) are available on the controller, then the location of the code POUs of an application can be changed specifically. In the case of a safety controller (SIL2), this can also be used for moving non-safety-relevant code POUs or entire libraries into this external memory.

If there are no specific requirements, then the code POUs are stored sequentially in the code areas (default). This means that the next code POUs are stored in the next areas only when the first code area is filled. In the POU Locations editor, you will see the current location of the POUs in the memory areas and you can change them specifically. Especially in the case of a safety application, this may be necessary for getting all safe POUs into the safe internal memory area.

For more information, see: Distributing Application Code to Different Memory Areas

Editor: POU Locations

Double-clicking the POU Locations object in the device tree of the controller opens the editor. At first, it gets only the entry <application>. After a code generation, all program blocks of the application are displayed with the respective object type, current location in the memory, and code size.

In the Configured Location column, you can set one of the memory areas other than the Current Location for each POU or library.

In order to move the POUs to the recently configured memory locations, you first have to Clean and then Generate Code again.

Tip

Note the messages in the category POU Locations. This is also shown when a code POU cannot be moved as expected.

Clean

Deletion of the compile information for the application

Corresponds to the Build → Clean menu command

This is a requirement for moving the POUs to the configured memory locations.

Generate Code

Starting of the code generation for the application

Corresponds to the Build → Generate Code menu command

This is a requirement for moving the POUs to the configured memory locations.

Objects

Objects of the application, including the objects from the referenced libraries

Type

Object type

Examples: Function Block, Method, Library

Current Location

Current memory location of the POU: area_<n>

Configured Location

Configured memory location where the POU is moved at the next code generation. Possible values:

  • default: Automatically assigned area

  • area_<n>: Explicitly assigned memory area (n=number)

Code Size

Code size of the POU (in bytes)