ns=2;s=DEPRAG Smart/Network/TCP/IP/ActiveClients/0/AutoReconnectActive
Determines whether the connection should be restored automatically after a connection loss.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bTcpIpReadAutoReconnectActive : BOOL;
bTcpIpWriteAutoReconnectActive : BOOL;
AutoReconnectActive : BOOL;
hrTcpIpAutoReconnectActive : HRESULT;
fbTcpIp : FB_TcpIp;
END_VAR
hrTcpIpAutoReconnectActive := fbTcpIp.ReadAutoReconnectActive(
bExecute := bTcpIpReadAutoReconnectActive,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
ClientId := '0',
Output => AutoReconnectActive);
IF hrTcpIpAutoReconnectActive <> S_FALSE THEN
bTcpIpReadAutoReconnectActive := FALSE;
END_IF
hrTcpIpAutoReconnectActive := fbTcpIp.WriteAutoReconnectActive(
bExecute := bTcpIpWriteAutoReconnectActive,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
ClientId := '0',
PointerToNodeValue := ADR(AutoReconnectActive),
SizeOfNodeValue := SIZEOF(AutoReconnectActive));
IF hrTcpIpAutoReconnectActive <> S_FALSE THEN
bTcpIpWriteAutoReconnectActive := 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".