ns=2;s=DEPRAG Smart/Utilities/StringOperations/Compare
Compares two specified strings and returns an integer indicating their relative lexicographic order.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bStringCompare : BOOL;
OutputDataStringCompare : ST_Int32OutputData;
hrStringCompare : HRESULT;
fbStringOperations : FB_StringOperations;
END_VAR
hrStringCompare := fbStringOperations.StringCompare(
bExecute := bStringCompare,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
StringOneToCompare := 'Test',
StringOneToCompareLength := SIZEOF('Test'),
StringTwoToCompare := 'test',
StringTwoToCompareLength := SIZEOF('test'),
IgnoreCase := FALSE,
OutputData => OutputDataStringCompare);
IF hrStringCompare <> S_FALSE THEN
bStringCompare := 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".