
25-01-2009, 16:15
|
 |
Orange Hat
 FRC #0247 (Da Bears)
Team Role: Webmaster
|
|
Join Date: Jan 2009
Rookie Year: 2009
Location: Michigan
Posts: 142
|
|
|
Re: "Pinger" diagnostic program to test robot network.
I was also trying to make a program with a vbs script that does that. It comes to something like this:
Quote:
set WshShell = CreateObject("WScript.Shell")
PC = Not CBool(WshShell.run("ping 10.2.47.6 -n 1 -w 150 " & vSystemIdentifier,16,True))
DS = Not CBool(WshShell.run("ping 10.2.47.5 -n 1 -w 150" & vSystemIdentifier,0,True))
router = Not CBool(WshShell.run("ping 10.2.47.4 -n 1 -w 150" & vSystemIdentifier,0,True))
bridge = Not CBool(WshShell.run("ping 10.2.47.1 -n 1 -w 150" & vSystemIdentifier,0,True))
cRIO = Not CBool(WshShell.run("ping 10.2.47.2 -n 1 -w 150" & vSystemIdentifier,0,True))
If PC = True and DS = True and router = True and bridge = True and cRIO = True Then
'successful
msgbox "It is Working",vbOkOnly
end if
if not PC = True and DS = True and router = True and bridge = True and cRIO = True then
'Unsuccessful ping
msgbox "Somthing is not Working"
End If
If PC = False then
msgbox "Please fix PC adress",vbRetryCancel
End If
If DS = False then
msgbox "Please fix DS adress",vbRetryCancel
End If
If router = False then
msgbox "Please fix Router adress",vbRetryCancel
End If
If bridge = False then
msgbox "Please fix bridge adress",vbRetryCancel
End If
If cRIO = False then
msgbox "Please fix cRIO adress",vbRetryCancel
End If
|
|