ns=2;s=DEPRAG Smart/Utilities/StringOperations/StartsWith
Checks if a text starts with a certain value.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bStringStartsWith : BOOL;
OutputDataStringStartsWith : ST_BoolOutputData;
hrStringStartsWith : HRESULT;
fbStringOperations : FB_StringOperations;
END_VAR
hrStringStartsWith := fbStringOperations.StringStartsWith(
bExecute := bStringStartsWith,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
ContainString := 'Ich bin ein String',
ContainStringLength := SIZEOF('Ich bin ein String'),
Value := 'String',
ValueLength := SIZEOF('String'),
IgnoreCase := TRUE,
OutputData => OutputDataStringStartsWith);
IF hrStringStartsWith <> S_FALSE THEN
bStringStartsWith := 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".