Ok I have a communication problem between the server and the device.Maybe someone might know the solution here or have come across this problem before.
What I have at the moment is a program that communicates with the server through TCP/IP by using IpSend and IpReceive blocks rest of the program seems to be working fine except for these 2 blocks. These two block are in the same function block and are called in the main program.
Whats happening is that IpSend doesn't always send out information on the first try(usually takes 3 or more times), the block loops until info is sent(meaning that if it doesn't send then it goes to IpReceive and back to IpSend), then i end up with the same data being sent to the server 3 times which is not needed. This also create a problem when receiving info from the server because IpReceive block doesn't wait and the data is usually lost as the server deletes it once it is sent.
I know this post is a bit long but would anyone have any advice on how to fix this?
What I have at the moment is a program that communicates with the server through TCP/IP by using IpSend and IpReceive blocks rest of the program seems to be working fine except for these 2 blocks. These two block are in the same function block and are called in the main program.
Whats happening is that IpSend doesn't always send out information on the first try(usually takes 3 or more times), the block loops until info is sent(meaning that if it doesn't send then it goes to IpReceive and back to IpSend), then i end up with the same data being sent to the server 3 times which is not needed. This also create a problem when receiving info from the server because IpReceive block doesn't wait and the data is usually lost as the server deletes it once it is sent.
I know this post is a bit long but would anyone have any advice on how to fix this?