codesysstructured-textiec61131-3

CONCAT two wstrings in codesys


I have the problem that the CONCAT(str1, str2) function does not take two wstrings and I have not found a concat function for wstring. So how should I do it?

I cannot convert the input to string and then back to wstring as I then loose information of the string. This ws_textOut:=STRING_TO_WSTRING(CONCAT("E ", WSTRING_TO_STRING(ws_TextIn))); does not work.


Solution

  • You can use WCONCAT to concatenate them.