Spurious bytes prefixed to FTP transmission

3 posts in this topic

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?


Share this post

Link to post
Share on other sites

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 by GJA

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now