Does anyone have experience using the Sockets library with TCP/IP and CoDeSys V3.3? I am trying to develop a TCP/IP application for the first time and I was wondering if someone could post me an example about Client/Server Communication over CoDeSys V3.3.
Thanks a lot
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm Calling Codesys support to get password for the download area ........
thanks again
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-01-30
Originally created by: crthomas1234
Hello,
I have been working on a similar project and after lots of trial and error, I have data being sent over UDP to a specified port.
The socket interface mirrors the Unix/Windows socket programming with a few changes.
Here is the code that I am using to send some simple some incrementing integers to a a receiver program on my PC that I wrote using c#.
CoDeSys V3 supports 2 types of socket layer management. The first is a basic control where you create a socket handle and then write data to that socket. The second is the Asynchronous socket management where you create a task manager to handle all requests and then project the task handler with the function calls so that it can be much more efficient in applications where you are opening, closing, and exchanging data on a lot of different connections.
I hope this code helps. You will need the following libraries added:
Does anyone have experience using the Sockets library with TCP/IP and CoDeSys V3.3? I am trying to develop a TCP/IP application for the first time and I was wondering if someone could post me an example about Client/Server Communication over CoDeSys V3.3.
Thanks a lot
I have used only SysLibSockets library for Codesys 2.3. Try to find TcpIp example in Codesys FTP folder http://3s-software.com/index.shtml?sample_projects
PS. Call Codesys support to get password for the download area.
Thanks Avgur for the answer.
I'm Calling Codesys support to get password for the download area ........
thanks again
Originally created by: crthomas1234
Hello,
I have been working on a similar project and after lots of trial and error, I have data being sent over UDP to a specified port.
The socket interface mirrors the Unix/Windows socket programming with a few changes.
Here is the code that I am using to send some simple some incrementing integers to a a receiver program on my PC that I wrote using c#.
CoDeSys V3 supports 2 types of socket layer management. The first is a basic control where you create a socket handle and then write data to that socket. The second is the Asynchronous socket management where you create a task manager to handle all requests and then project the task handler with the function calls so that it can be much more efficient in applications where you are opening, closing, and exchanging data on a lot of different connections.
I hope this code helps. You will need the following libraries added:
SysSocket.lib
SysTypes.lib
CmpErrors.lib
----------------------- DECLARATION ------------------------------------
VAR
END_VAR
-------------------------- CODE --------------------------------------------
IF bFirst THEN
END_IF
My_Data[0] := My_Data[0]+1;
My_Data[1] := My_Data[1]+1;
My_Data[2] := My_Data[2]+1;
My_Data[3] := My_Data[3]+1;
My_Data[4] := My_Data[4]+1;
SysSockSendToUdp(
Related
Talk.ru: 1
Talk.ru: 2
Talk.ru: 3
Read "Beej's Guide to Network Programming Using Internet Sockets" http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html.
It's a great thing to understand socket programming for beginners!
Hi,
Hello I am completely new to CoDeSys
I am in a simular position to Orpheus, investigating creating a TCP socket. Then waiting for a connection. Trying to recieve data, then to reply.
The example I found was of little help as it was for V2.3 and so converting it to V3.3 required more knowledge than I have at the moment.
Has anyone a V3.3 example for TCP ?
Thank you very much crthomas1234.........
Unfortunatly my application can't work with UDP connection because the server is a "Customer Server" and he always use TCP connection...
Thanks again
Originally created by: crthomas1234
Hello, I am sorry, I missed the part about TCP/IP in your orignal post. The functions in the SysSocket.lib are also available for TCP connections.
But from what I have been told my 3S Support, the TCP functions aren't working well yet.
I have not tried them myself.
Don't worry.....There is no problem...
Thanks anyway for your post.