SysSockPing (FUN)¶
FUNCTION SysSockPing : RTS_IEC_RESULT
Check the availability of the communication partner with a ping request.
- InOut:
Scope
Name
Type
Comment
Return
SysSockPingRTS_IEC_RESULT- Runtime system error code (see CmpErrors.library):
- ERR_OK: Partner availableERR_TIMEOUT: Partner cannot be reached, or 0 ms as timeout providedAll other results: Ping could not be sent because of other errors, so we don’t know, if the partner is available.
Input
szIPAddressREFERENCE TO STRING
IP address of the communication partner as string
ulTimeoutUDINTTimeout 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.
pulReplyTimePOINTER TO UDINT
Pointer to get average reply time of the ping request in milliseconds