IRpcCallableInstance.InvokeRpcMethod Method
Invokes the specified method.
          Namespace:  TwinCAT.TypeSystem
Assembly:  TwinCAT.Ads (in TwinCAT.Ads.dll)
Version: 4.3.0.0
Syntax
C#
Object InvokeRpcMethod(
string methodName,
Object[] parameters
)
VB
Function InvokeRpcMethod (
methodName As String,
parameters As Object()
) As Object
Parameters
| 
                   methodName  | 
                   Type: System.String  | 
| 
                   parameters  | 
                   Type: .System.Object.  | 
Return Value
Type: Object
The return value of the RPC Method
Remarks
To indicate a PLC Method for remote ads access, the attribute 'TcRpcEnable' must be declared on the method declaration (see example).
Examples
RPC Method definition and implementation
(* Declaration *)
{attribute 'TcRpcEnable'}
METHOD RpcMethod1 : INT
VAR_INPUT
i1 : INT;
END_VAR
(* Implementation *)
RpcMethod1 := i1 + 1;