Basic Tutorial on TwinCAT (Beckhoff) Using and Converting Common Types of TwinCAT_ character string

 Generally, the string will be added with a length limit, such as A:STRING(80); as for the actual string length, it should not exceed this limit.










In the test, I demonstrated two string methods, CONCAT string concatenation and REPLACE string replacement. Concatenation is self-explanatory, but replacement is more special.  The first parameter is the input string (the string to be replaced), the second parameter is the new string to replace it with, the fourth parameter is the starting index of the input string to replace, and the third parameter is the number of characters to replace. For example, 'Hello ' starts to be replaced from the second character, replacing one character with X, so it becomes 'HXllo ', World! starts to be replaced from the first character, replacing three characters with Y, so it becomes 'Yld!'.









For more string methods, refer to the official help documentation of Beckhoff (search for CONCAT to find the usage of this function and other related methods)