Peter Nachtwey
Member
I have some old S7-300 code that uses Tsend and Trecv to implement a UDP transfer. It worked on a S7-300 with a built in Ethernet port.
I wrote two FBs. One would do a read and the other a write.
The Tsend and Trecv are basically the S7's version of socket commands.
The main problem I see with my code is that it uses a combination of LD and STL so it won't work with S7-1200s or S7-1500s as the STL is different.
I used a different header than a Modbus TCP header. My header is 16 bytes long and ensures all the data is word or dword aligned unlike Modbus TCP.
https://deltamotion.com/peter/S7/Pndp-udp.zip
This code was used only a few times and was ignored after Profinet came out.
I wrote two FBs. One would do a read and the other a write.
The Tsend and Trecv are basically the S7's version of socket commands.
The main problem I see with my code is that it uses a combination of LD and STL so it won't work with S7-1200s or S7-1500s as the STL is different.
I used a different header than a Modbus TCP header. My header is 16 bytes long and ensures all the data is word or dword aligned unlike Modbus TCP.
https://deltamotion.com/peter/S7/Pndp-udp.zip
This code was used only a few times and was ignored after Profinet came out.