SysSockPing (FUN)

FUNCTION SysSockPing : RTS_IEC_RESULT

Check the availability of the communication partner with a ping request.
InOut:

Scope

Name

Type

Comment

Return

SysSockPing

RTS_IEC_RESULT

Runtime system error code (see CmpErrors.library):
ERR_OK: Partner available
ERR_TIMEOUT: Partner cannot be reached, or 0 ms as timeout provided
All other results: Ping could not be sent because of other errors, so we don’t know, if the partner is available.

Input

szIPAddress

REFERENCE TO STRING

IP address of the communication partner as string

ulTimeout

UDINT

Timeout in milliseconds to wait until reply. Must be greater than 0. On VxWorks this value (greater than 0) is ignored, as the OS configuration is relevant regarding the timeout.

pulReplyTime

POINTER TO UDINT

Pointer to get average reply time of the ping request in milliseconds