5/5/2013 8:59 AM | |
Joined: 12/22/2006 Last visit: 1/25/2022 Posts: 1742 Rating: (308) |
Hello, As you told already, you do not know the length in advance. You must find another way to detect the end of the message. For instance a specific character at the end of the message like carriage return (CR). The basic idea is than to receive char by char (length = 1) till you detect that ending character. An exmaple of this given in this FAQ: How is data with variable message length transferred via the TCP protocol and received by an S7-300 station via the Industrial Ethernet CP? http://support.automation.siemens.com/WW/view/en/51101016 |
Best regards |
|
Follow us on