CODESYS Talk
WREPLACE (like most Standard library string functions) works with WSTRING(255), so the result gets cut at 255 characters no matter how big your target variable is. Your second line stops right about there. Since the date always has the same length you don't need REPLACE at all. Find it once and overwrite the 10 characters in place: nPos := WFIND(sQuery, "(date:"); IF nPos > 0 THEN nPos := nPos + 8; // skip "(date:" plus the escaped quote, adjust to your literal SysMemCpy(pDest := ADR(sQuery) + TO_UDINT(nPos...
Hi, it seems this is already solved with the version 3.5.22.40. Regards Edwin
Many thanks for putting all this together and sharing it, really appreciate the effort you put into this!
Ive got a WSTRIN(512) . I want to change the date. But when i Use WREPLACE it wil cut the string. WHY ? And how to solved this. Origanal string is the first to lines. The change the next 2
Hi Georg, Thank you very much for your guidance and suggestions. I'm pleased to confirm that the issue has been successfully resolved. The robot is now moving correctly on all six axes, and the rotation directions are consistent. The root cause was the IRB robot configuration in RoboDK. Specifically, Joint 2 and Joint 3 were configured in the opposite order compared to the CODESYS configuration. After correcting the joint configuration, all robot movements worked as expected. Everything is now working...