in der WagoLibSockets.lib gibt es eine Funktion Sock_Ping.
Damit kannst du einen Ping absetzen und bekommst bei erfolgreicher Antwort ein True.
[FONT=arial]
dwAdresse:=SysSockNtohl(dwNet:=SysSockInetAddr(stIPAddr:=sMeineIP));
wRueckgabe:=SOCK_PING(address:=dwAdresse, timeout:=t#30ms)
[/FONT]
Du kannst den Rückgabewert aber auch als Beschreibung (z.B. "SOCK_TIMEOUT") zurücklesen - d.h. da es ENUMs sind, deklarierst du den Rückgabewert genauso wie in der Bibliothek angezeigt als SOCK_RET.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?