ns=2;s=DEPRAG Smart/Network/TCP/IP/ActiveClients/0/SendString
The command sends a string as a TCP/IP message to the server.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bTcpIpSendString : BOOL;
OutputDataTcpIpSendString : ST_VoidOutputData;
hrTcpIpSendString : HRESULT;
fbTcpIp : FB_TcpIp;
END_VAR
hrTcpIpSendString := fbTcpIp.SendString(
bExecute := bTcpIpSendString,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sMessage := 'Test',
sClientId := '0',
OutputData => OutputDataTcpIpSendString);
IF hrTcpIpSendString <> S_FALSE THEN
bTcpIpSendString := 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".