Deleting variables under the Retain Handler
If variables are deleted from the PLC, the link with the Retain Handler is cancelled. However, the variables continue to be shown under the Retain Handler and are not deleted automatically.
Under TwinCAT 3 the variables have to be deleted manually.
Prerequisites for this step:
- Variables declared with VAR_RATAIN were deleted from the PLC.
Delete the variables under the Retain Handler as follows:
- 1. The variable GVL_Retain.iNt under the Retain Handler is to be deleted.
- 2. Right-click on the Retain Handler in the tree view on the left.
- 3. In the context menu click on Optimize Retain Variables.
- The variable under the Retain Handler is deleted.