FB_OpcUAServer

The function block enables status information to be read out and a TwinCAT OPC UA Server to be restarted.
Syntax
Definition:
FUNCTION_BLOCK FB_OpcUAServer
VAR_INPUT
sNetId : T_AmsNetId;
bExecute : BOOL;
eOpcUAServerOption : E_OpcUAServerOption;
tTimeout : TIME;
END_VAR
VAR_OUTPUT
stOpcUAServerInfo : ST_OpcUAServerInfo;
bBusy : BOOL;
bError : BOOL;
nErrorId : UDINT;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
sNetId | T_AmsNetId | AmsNetId of the system on which the TwinCAT OPC UA Server runs. |
bExecute | BOOL | A rising edge activates processing of the function block. |
eOpcUAServerOption | Specifies the operation to be performed. | |
tTimeout | TIME | ADS Timeout |
Outputs
Name | Type | Description |
---|---|---|
stOpcUAServerInfo | Contains status information from the server when ServerInfo is selected at the eOpcUAServerOption input. | |
bBusy | BOOL | TRUE as long as processing of the function block is in progress. |
bError | BOOL | Becomes TRUE as soon as an error situation occurs. |
nErrorId | UDINT | Contains the error code when an error (bError) occurs. |