'TcPersistent' attribute

This pragma causes the following variables to be created as persistent variables that retain their value after an uncontrolled termination (power failure). The pragma thus represents an alternative to using the keyword VAR PERSISTENT.

Syntax: {attribute 'TcPersistent'}

Insertion location: Line above the declaration line of a variable

Sample:

PROGRAM MAIN
VAR
    {attribute 'TcPersistent'}
    nVar1  : INT;
END_VAR