ns=2;s=DEPRAG Smart/Network/TCP/IP/ActiveClients/0/Encoding
The encoding of the message content: Ascii, BigEndian, Unicode, Default, Latin1, Unicode, Utf32, Utf7, Utf8
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bTcpIpReadEncoding : BOOL;
bTcpIpRWriteEncoding : BOOL;
TcpIpEncoding : DINT;
hrTcpIpEncoding : HRESULT;
fbTcpIp : FB_TcpIp;
END_VAR
hrTcpIpEncoding := fbTcpIp.ReadEncoding(
bExecute := bTcpIpReadEncoding,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
ClientId := '0',
Output => TcpIpEncoding);
IF hrTcpIpEncoding <> S_FALSE THEN
bTcpIpReadEncoding := FALSE;
END_IF
hrTcpIpEncoding := fbTcpIp.WriteEncoding(
bExecute := bTcpIpRWriteEncoding,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
ClientId := '0',
PointerToNodeValue := ADR(TcpIpEncoding),
SizeOfNodeValue := SIZEOF(TcpIpEncoding));
IF hrTcpIpEncoding <> S_FALSE THEN
bTcpIpRWriteEncoding := 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".