ConnectionTimeoutInMilliseconds

Read TwinCAT TIA
Network REST Client ActiveClients One client

ns=2;s=DEPRAG Smart/Network/HTTP/REST/ActiveClients/0/ConnectionTimeoutInMilliseconds

Maximum time in milliseconds for establishing a connection to the REST API. If a connection cannot be established within the time interval, an error is issued.

Examples:

In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:

Beckhoff parameter:

    bHttpReadConnectionTimeoutInMilliseconds
    A boolean variable that can be used to trigger the execution of the ReadConnectionTimeoutInMilliseconds command.
    OutputHttpReadConnectionTimeoutInMilliseconds
    A DINT variable in which the time limit for calls to the REST API is stored.
    hrHttpReadConnectionTimeoutInMilliseconds
    This can be used to monitor the execution of the command. Error codes have the type HRESULT.
    fbHttpRest
    An instance of the "FB_HttpRest" function block supplied with the DEPRAG Smart library.
    ClientId
    A String(255) variable that specifies the client that should execute the command.
    ConnectionHandle
    "ConnectionHandle" received when establishing a connection between DEPRAG Smart Server and your OPC UA client.


VAR
     bHttpReadConnectionTimeoutInMilliseconds  : BOOL;
     OutputHttpReadConnectionTimeoutInMilliseconds : DINT;
     hrHttpReadConnectionTimeoutInMilliseconds  : HRESULT;

     fbHttpRest   : FB_HttpRest;
END_VAR

              

hrHttpReadConnectionTimeoutInMilliseconds := fbHttpRest.ReadConnectionTimeoutInMilliseconds(
       bExecute    := bHttpReadConnectionTimeoutInMilliseconds,
       ConnectionHandle  := depragSmartConnection.ConnectionHandle,
       ClientId   := '0',
       Output    => OutputHttpReadConnectionTimeoutInMilliseconds);
IF hrHttpReadConnectionTimeoutInMilliseconds <> S_FALSE THEN 
     bHttpReadConnectionTimeoutInMilliseconds := FALSE;
END_IF 
                                                    

For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".