Now, I have V2.3 codesys program. and I have to use V2.3 because my device is set in V2.3 and updating program of the device from V2.3 to V3.5 is impossible. .
I'm finding a function to ping an IP, But, I don't know how to do it.(I already searched the way in Google, and Codesys forum.)
(add. Do you know the function that can confirm if Server is living or not?)
Is it possible that V2.3 can use the library of V3.5? If it is possible, let me know how to get the SysSock library in File?( I mean Iβd like to extract the SysSock library)
I know there is the function in V3.5. So I want to try to use the V3.5 SysSock library if it is possible.
With your information, I can't get the library through V3.5 or I don't know.
Please, help me how to do it if you know an idea or the way.
3.
If the second question is impossible, can I use the library ,which I made with other language such as C++, in V2.3?
Please, help me!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
sarathbabu hat geschrieben:
Hi
Can you tell in detail what exactly you want.
You want to ping from u r pc to PLC or you are communicating to other device through PLC?
Sarath
Hi,
I'd like to know if the server lives or not in V2.3.
Now, Codesys v2.3(Client-I added a jpg file(Picture)/IFM-CR1081) is, and PC(Server) is.
Client(IFM-CR1081) will ping a PC(Server) IP.
Case) PC(Server) is disconnected with Client(because What situation I don't know). and then Client doesn't know the situation. So, Client has to ping a server IP to live. But I don't know how to ping the IP( which function in library or other ways).
I know there is the function(SysLibSockets.lib-SysSockPing) in V3.5. but I have to use V2.3.
But, In V2.3 I don't know how to do that!
Please, Help me!!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
sarathbabu hat geschrieben:
Hi
There are two function for TCP
SysSockSend()
SysSockRecv()
using these two functions you can send some thing to your server and check you can get it back
Hi,
I know that V2.3 has both(SysSockSend(),SysSockRecv()). My point question is to know how to ping other device IP.
In my project communication is wireless, so disconnection might be possible. I have to check whether Server PC is working from Client(device-CodesysV2.3)or not. So, I'd like to know what way is ping checking. If I know the way, the problem in my program will be Ok. Please, help me.
Sincerely,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are few replies to your question, because:
- It was asked / replied before
- Pinging a host is probably not what tells you, if a service is still available at server side (there are different implementations of "ping", some of it is using ICMP, other TCP echo... both of them is really target and network dependent/ To answer your question, there is no standard, "built-in" functionality in CoDeSys and standard system libraries to ping a host. Really try to see oscat, or see your platform dependent libraries....
So, probably you'd like to know, if the server at the other side is still connected... Well, it also depends on your server's actual implementation. Is it TCP or UDP?
In general, if there is an application protocol allowing request / response, the safest from the client side is to send "keepalive" requests, wait for the response, and if it does not come in a while you can suppose that the server was disconnected.
From the server side, with TCP sockets, and the SO_REUSEADDR option on the server socket, and in non-blocking mode: If the select call returns true for reading a given socket, and after that you call read, but you receive 0 bytes, then you can also suppose that the connection was closed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, This is Yoon.
I have some questions.
1.How can I ping an IP in V2.3?
Now, I have V2.3 codesys program. and I have to use V2.3 because my device is set in V2.3 and updating program of the device from V2.3 to V3.5 is impossible. .
I'm finding a function to ping an IP, But, I don't know how to do it.(I already searched the way in Google, and Codesys forum.)
(add. Do you know the function that can confirm if Server is living or not?)
I know there is the function in V3.5. So I want to try to use the V3.5 SysSock library if it is possible.
With your information, I can't get the library through V3.5 or I don't know.
Please, help me how to do it if you know an idea or the way.
3.
If the second question is impossible, can I use the library ,which I made with other language such as C++, in V2.3?
Please, help me!!
have a look in the network library of oscat.de (yes english version is available.
download the lib, the txt and the pdf
I got it(library-oscat_basic_333.lib). But, I don't know which function is ping. Please, let me know in detail.
I'm a beginner.
Hi
Can you tell in detail what exactly you want.
You want to ping from u r pc to PLC or you are communicating to other device through PLC?
Sarath
Hi,
I'd like to know if the server lives or not in V2.3.
Now, Codesys v2.3(Client-I added a jpg file(Picture)/IFM-CR1081) is, and PC(Server) is.
Client(IFM-CR1081) will ping a PC(Server) IP.
Case) PC(Server) is disconnected with Client(because What situation I don't know). and then Client doesn't know the situation. So, Client has to ping a server IP to live. But I don't know how to ping the IP( which function in library or other ways).
I know there is the function(SysLibSockets.lib-SysSockPing) in V3.5. but I have to use V2.3.
But, In V2.3 I don't know how to do that!
Please, Help me!!!
Hi
SysSockSend()
SysSockRecv()
using these two functions you can send some thing to your server and check you can get it back
Hi,
I know that V2.3 has both(SysSockSend(),SysSockRecv()). My point question is to know how to ping other device IP.
In my project communication is wireless, so disconnection might be possible. I have to check whether Server PC is working from Client(device-CodesysV2.3)or not. So, I'd like to know what way is ping checking. If I know the way, the problem in my program will be Ok. Please, help me.
Sincerely,
Sry,
There are few replies to your question, because:
- It was asked / replied before
- Pinging a host is probably not what tells you, if a service is still available at server side (there are different implementations of "ping", some of it is using ICMP, other TCP echo... both of them is really target and network dependent/ To answer your question, there is no standard, "built-in" functionality in CoDeSys and standard system libraries to ping a host. Really try to see oscat, or see your platform dependent libraries....
So, probably you'd like to know, if the server at the other side is still connected... Well, it also depends on your server's actual implementation. Is it TCP or UDP?
In general, if there is an application protocol allowing request / response, the safest from the client side is to send "keepalive" requests, wait for the response, and if it does not come in a while you can suppose that the server was disconnected.
From the server side, with TCP sockets, and the SO_REUSEADDR option on the server socket, and in non-blocking mode: If the select call returns true for reading a given socket, and after that you call read, but you receive 0 bytes, then you can also suppose that the connection was closed.