ns=2;s=DEPRAG Smart/Utilities/StringOperations/Insert
Inserts text at a specified index position into another text and returns the result.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bStringInsert : BOOL;
OutputDataStringInsert : ST_StringOutputData;
hrStringInsert : HRESULT;
fbStringOperations : FB_StringOperations;
END_VAR
hrStringInsert := fbStringOperations.StringInsert(
bExecute := bStringInsert,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
StringToInsertIn := 'IamATestString',
StringToInsertInLength := SIZEOF('IamATestString'),
StringToInsert := 'Beautiful',
StringToInsertLength := SIZEOF('Beautiful'),
StartIndex := 4,
OutputData => OutputDataStringInsert);
IF hrStringInsert <> S_FALSE THEN
bStringInsert := 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".