CODESYS provides special POUs which implement implicit monitoring functions. At runtime, these functions check the limits of arrays or subrange types, the validity of pointer addresses, and division by zero.
-
In the device tree, select the Application object.
Click .
The Add POU for Implicit Checks dialog opens.
-
Select the desired functions.
-
Click the Add button.
The selected POUs are inserted below the Application in the device tree.
-
Open the POUs in the editor.
-
Adapt the implementation suggestion to your requirements.
Caution To get the feature for monitoring functions, do not edit the declaration part. However, you are permitted to add local variables.