Attribute ‘no_copy’

In general an online change requires a re-allocation of instances, for example of a POU. In the process, the value of the variable contained in the instance is copied.

The pragma prevents the value of the variable contained in the instance from being copied in the course of an online change; instead, the variable is re-initialized in the course of an online change. This can be useful for a local pointer variable that points to a variable that has just been shifted by the online change and thus has a changed address.

You insert the attribute in the declaration part above the line of the declaration of the variables concerned.

Syntax:

{attribute 'no_copy'}