Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

How to Ping an IP address in CoDeSys

2012-03-31
2018-11-22
  • hiten.upadhyay - 2012-03-31

    Can anyone please help me in "How to Ping an IP address in CoDeSys?"

     
  • Anonymous - 2012-04-13

    Originally created by: Matthias S.

    Hello, hiten.upadhyay

    I use CoDeSys V3.5. There is included the library "SysSocket".
    Inside this library SysSocket is the function "SysSockPing".

    I use this Function sometimes and it works.

    Here my example
    PROGRAM PLC_PRG
    VAR
    PingTime: UDINT;
    END_VAR

    SysSockPing(szIPAddress:='192.168.3.1', ulTimeout:=500, pulReplyTime:= ADR(PingTime));

    I checked it with Wireshark - the ping works.

    Greetings,
    Matthias

     
  • hiten.upadhyay - 2012-04-25

    Thank you very much Matthias for the reply.
    I am using ABB PLC and it comes with Codesys V2.3 and the the function 'SysSockPing' is not supported in the SysLibSocket provided.
    Can you pls help me in getting the latest version of 'SysLibSocket.lib' library from net.

    Thanks and regards,

     
  • fleaplc

    fleaplc - 2018-11-22

    Did someone find the way to get a library in Codesys 2.3 to ping an IP node?

     

Log in to post a comment.