Read-only statement
(* Syntax in order to transform the object into a read-only object *)
{ Readonly ('your comment')}
PROGRAM name1 | FUNCTION_BLOCK name2 | FUNCTION name3 | TYPE | INTERFACE name4 | GLOBALS
...
Meaning |
transform the current ST-object or global-object into a read-only object This statement is provided as an enhancement to the →IEC-standard. The statement { Readonly ('your comment')} must be inserted at the beginning of the object and is valid for all elements within the object (hence in the case of an ST-object: →POUs, →data types and →interfaces; hence in the case of an global-object: →global variables).
Any text can be specified within () to give a reason for the read-only mode. This text is a STRING literal with 255 characters at most. Details on STRING literals: see under →character string literal |
{ Readonly ('auto generated file')}
TYPE
complex : STRUCT
re : REAL;
im : REAL;
END_STRUCT;
END_TYPE
{ Readonly ('auto generated file')}
GLOBALS MyGVs
VAR_GLOBAL
Setting_1 : INT;
Setting_2 : BOOL;
END_VAR
END_GLOBALS