ReadOnly

ReadOnly 1:

Requirements

This functionality is only available for Data Access devices based on TwinCAT 3 and the import of TMC symbol files.

The following pragma can be used to set a symbol read-only. The server then acknowledges write operations by an OPC UA client with the StatusCode BadNotWriteable.

{attribute 'OPC.UA.DA' := '1'}
{attribute 'OPC.UA.DA.Access' := '1'}
nMyCounter : INT;

ReadOnly 2:

In the case of TwinCAT 3 C++, you can also use this pragma in the TMC Code Generator to mark a node as read-only. Please note that this feature is only available under TwinCAT 3 C++ when using online symbolism.

ReadOnly 3: