LAN Status

Hello Sir,
I am using IWS 7.0.

I want to show LAN Status of Remote PCs connected with the same local network.

Is there any inbuilt function to ping any device or check status?

Looking forward for your reply.
Thanks & Regards
Sanjoy Sarkar
  • Indusoft technical support referred me to the following article... Ping a LAN device using vbscript.

    I applied the methods in the article to create a SNMP map. It allows the monitoring of any IP network device. You're not limited to IWS stations. Very useful for those 2:00AM phone calls.

    Regards,
  • Hi Sanjoy.

    I couldn't see any Indusoft functions specifically intended for this purpose. However, you may also be able to use SNMPGet(). I am not familiar with the SNMP protocol, but the function mentions return values of -3 and -4 which indicate 'Cannot connect to the remote machine'. Perhaps this function can be used simply to determine if the machine is on the network.
  • Here is what we do

    Public Function Ping(strHost)
    Dim objPing, objRetStatus
    Set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _
    ("select * from Win32_PingStatus where address = '" & strHost & "'")
    For Each objRetStatus In objPing
    If IsNull(objRetStatus.StatusCode) Or objRetStatus.StatusCode<>0 Then
    Ping = False
    Else
    Ping = True
    End If
    Next
    End Function


    call from Scheduler

    Clock 00:00:30 MasterPLC RunGlobalProcedureOnServer( "Ping","172.21.181.64")

    Every 30 seconds it will ping that address and return a true if it gets a response and a false if no response. StrHost can be the actual IP address or a FQDN "ping.symantec.com". MasterPLC is a tag that the returned value is stored in. If you have multiple stations to poll you can add the responses "MasterPLC" + PLC2 + PLC3 in the scheduler and then alarm the result if it is not equal to 3.

    Mike