FB_init

Syntax

Method FB_init : BOOL
VAR_INPUT
    sSrvNetID                   : T_AmsNetID := ‘’;
    sRemoteHost                 : T_IPv4Addr := ‘127.0.0.1’;
    tReconnect                  : TIME       := T#30s;
    iResExtract                 : I_ResExtract;
END_VAR

VAR_INPUT

sSrvNetID: AMS Net Id. For the local computer (default) an empty string may be specified.

sRemoteHost: Target IPv4 address.

tReconnect: Cooldown time for recreating a TCP connection after a TCP connection has been terminated.

iResExtract: The function block that implements the interface I_ResExtract.

Example:

Declaration of the function block FB_Connect:

PROGRAM MAIN
VAR
    fbConnect           : FB_Connect(‘’, ‘192.168.1.101’, T#15S, fbResExtract);
    fbResExtract        : FB_QRC_ResExtract;
END_VAR