Skip to main content

Command: Check Memory for Active Application

Function: The command starts the memory check for the active application.

Call: Debug menu

Requirement: The CODESYS Memory Tools package is installed. The application is in online mode.

The memory area of the active application is checked for the following:

  • BOOL variables have defined values.

  • STRING and WSTRING variables are terminated.

  • Enumeration variables have valid values.

  • Variable of a subrange type have valid values.

  • Variable of a constant block type (STRUCT, ARRAY, etc.) are unchanged from their initialization values.

  • Function pointer addresses are consistent internally.

  • Function pointers in the project point to memory managed by CODESYS Memory Tools. Function pointers to library POUs or external POUs are excluded, as these could be in external memory.

  • Pointers to a type point to memory locations of that type.

  • Pointers point to memory locations whose address is aligned to the type granularity, or is 0 or -1.

  • Interface variables and function table pointers are consistent internally.

  • The code of compiled POUs is unchanged.

    Note: Compiled POUs with breakpoints are excluded from the check because the code is manipulated for these at runtime.

The results of the check are displayed in the message view. Violations against the test criteria are listed as warnings.

Double-clicking a message opens the Memory view where the corresponding location is highlighted in orange.

The Memory view can also be opened by means of the View → Memory command.

The check can be limited by means of the 'memory_check' attribute.