Attribute 'TcRpcEnable'

The pragma can be used to activate a method for a Remote Procedure Call (RPC). This allows the method to be called via ADS. The TwinCAT OPC UA server needs this pragma to make the method available as an OPC UA method.

Syntax: {attribute 'TcRpcEnable'}

Insertion location: First line above the declaration part of the method.

Sample:

{attribute 'TcRpcEnable'}
METHOD M_Sum : INT
VAR_INPUT
    nInput1 : INT;
    nInput2 : INT;
END_VAR

Further samples: