ns=2;s=DEPRAG Smart/Utilities/StringOperations/Substring
Returns the part of the specified text starting from a passed index position.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bStringSubstring : BOOL;
OutputDataStringSubstring : ST_StringOutputData;
hrStringSubstring : HRESULT;
fbStringOperations : FB_StringOperations;
END_VAR
hrStringSubstring := fbStringOperations.StringSubstring(
bExecute := bStringSubstring,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
ContainString := 'Ich bin ein String',
ContainStringLength := SIZEOF('Ich bin ein String'),
StartIndex := 5,
OutputData => OutputDataStringSubstring);
IF hrStringSubstring <> S_FALSE THEN
bStringSubstring := 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".