0

we are trying to process a 152 bytes UDP data frame from a remote service. By following the PeerToPeer Beckhoff infosys example (https://infosys.beckhoff.com/content/1033/tf6310_tc3_tcpip/18014398593720075.html?id=9052404215823027436) we are not able to see the entire 152 bytes message, just a couple of bytes.

Is it possible that the String variable would be only showing the characters until the first 00 bytes or similar (null delimiter)?

In the image below you can see the full UDP frame and what we get as message.

Thanks in advance.

enter image description here

4

1 回答 1

2

You are correct, the Beckhoff PeerToPeer example will not work with binary data because it uses strings that will cut off at zero value. So it doesn't like the UDP data you have for it.

Instead you should use function blocks like e.g. ReceiveData which will work with a data array and pointers, thus allowing any byte value received. You can do a google search for 'Beckhoff ReceiveData' to get the precise information.

于 2018-06-28T10:52:36.673 回答