I am using twincat 3 to send some strings over TCP/IP. Where the server is a sensor and my PLC is the client. I noticed that the sensor didnt react to my commands, so i set up a server in Python to see how the sent strings looked like. I noticed that there were trailing zeros after the string was printed in Python. When i loopback the sent data that python recieved to twincat, there is not any trailing zeros.
Does anybody know how to remove the trailing zeros before the string is sent in twincat? I have tried to do this sLRTrim := F_RTrim( F_LTrim('string'));
But it dosent work. Have also defined the variable as a String(22), but whenever i do that, it just replace my last string with a trailing zero.
Does anybody know how to remove the trailing zeros before the string is sent in twincat? I have tried to do this sLRTrim := F_RTrim( F_LTrim('string'));
But it dosent work. Have also defined the variable as a String(22), but whenever i do that, it just replace my last string with a trailing zero.