Internet PLC Forum

General => Technical support => Topic started by: EDGAR on August 28, 2014, 07:38:55 AM

Title: Ethernet output buffer?
Post by: EDGAR on August 28, 2014, 07:38:55 AM
Hello,

We are on the first stages of testing a new web service that will extend current PLC functionality via the web to interface with other web enable device. During the testing we are noticing that the Ethernet output buffer is not clearing after each write. Is there a function or a procedure to clear the buffer that we are missing?

Example:
//Send test string...
PRINT #4 "This is a long string that contains information about this PLC"
//Run your data read loop here....
//Send another string...
PRINT #4 "This is a great PLC"  //but when you look at the server side the text we receive is like this  "This is a great PLCg that contain information about this PLC"

We are getting the remaining char in the buffer "g that contains information about this PLC".

Before and after each command we tried the following loop but it still transferring the same.

While (len(X$) > 0)
   X$ = Input$(4)
endwhile

Anything else you can suggest? Currently, on the server side we are parsing the string up to the first CR.

Thanks,
Ed
Title: Re:Ethernet output buffer?
Post by: support on August 28, 2014, 11:56:29 AM
The problem is likely to be on the server side. Are you writing your own server script? Can you use a wireshark to capture the TCP/IP frame that your server receives?
Title: Re:Ethernet output buffer?
Post by: EDGAR on August 28, 2014, 01:31:22 PM
Thanks, I will send you the captured session later today.

Ed
Title: Re:Ethernet output buffer?
Post by: EDGAR on August 28, 2014, 06:45:07 PM
You are 100% correct, we completely overlooked the buffer on the server side. Everything is working fine now...

Thanks,
Ed