Posted 11 Sep 2018 A TCP connection to a printer, opened via TCON, prefixes two spurious bytes to every transmission. The typical prefix is FE 04 (hex); FE 0D is also seen. Also, the carriage return and line feed characters that end the transmission (per rule set by the receiving device) are not included in the transmission. The string sent by the PLC is correct, as seen in the monitor. The pattern of prefixed bytes and lost terminator bytes is consistent--it is not random. It would seem that the configuration of the connection in the PLC is wrong. We have not been able to find anything wrong. Any suggestions? Thanks. Share this post Link to post Share on other sites
Posted 11 Sep 2018 (edited) We are passing a string variable to TSEND. Perhaps the two prefix bytes are the internal header for the string, specifying actual length and perhaps maximum length? Is there a function to convert from a string to a byte array? S_CONV converts first character to a single byte. Edited 11 Sep 2018 by GJA Share this post Link to post Share on other sites