Well, here is an update regarding the Open Comms block transfer using TRCV (FB64) on TCP and Winsock.
Connection is established using TCON (FB65) and then I use the command Winsock1.SendData bytearray() to send the data array to the PLC. The TRCV is in Ad-hoc mode (Len=0) and it puts the received data in DB1 (a byte array).
The transfer success rate is good for small amounts of data, but the failure rate increases to 1 in 10 for block transfers of 8000 bytes. For some reason, half way through the transfer the TRCV flags that it has received the whole block. It part fills the DB1 resets the pointer and if EN_R is true it continues scanning for incoming blocks. Of course the next block is the remaining part of the truncated block which is now dumped at the beginning of DB1 making a big mess!
I am curious about the cause of the transfer split, sometimes it splits at the same place, it’s very odd. At the moment I am discarding blocks that are short in length, but any wise words would be much appreciated.
All the best