Combo
April 6th, 2009, 07:50 AM
This code doesn't work like it should for some reason. Therefor I will delete it and search for a solution on the windows side I think.
Dim fs, f, file_path_HI, file_path_AL, file_path_CO, file_HI, file_AL, file_CO
'Controle Shared Folders
Set fs = CreateObject("filectl.filesystem")
Set f = CreateObject("filectl.file")
file_path_HI = "\\PLC_102\HISTORIAN\ (file://\\PLC_102\HISTORIAN\)"
file_path_AL = "\\PLC_102\ALARMS\ (file://\\PLC_102\ALARMS\)"
file_path_AL = "\\PLC_102\CORRECTIES\ (file://\\PLC_102\CORRECTIES\)"
file_HI = file_path_HI & "Netw_test"
file_AL = file_path_AL & "Netw_test"
file_CO = file_path_CO & "Netw_test"
If fs.dir(file_HI)="Netw_test" And fs.dir(file_AL)="Netw_test" And fs.dir(file_CO)="Netw_test" Then
SmartTags("Netwerk_Ok") = 0
Else
SmartTags("Netwerk_Ok") = 1
End If
It detects when there is no connection, but after the connection is physically repaired, the alarm doesn't dissapear, Netwerk_Ok remains high in other words...
Dim fs, f, file_path_HI, file_path_AL, file_path_CO, file_HI, file_AL, file_CO
'Controle Shared Folders
Set fs = CreateObject("filectl.filesystem")
Set f = CreateObject("filectl.file")
file_path_HI = "\\PLC_102\HISTORIAN\ (file://\\PLC_102\HISTORIAN\)"
file_path_AL = "\\PLC_102\ALARMS\ (file://\\PLC_102\ALARMS\)"
file_path_AL = "\\PLC_102\CORRECTIES\ (file://\\PLC_102\CORRECTIES\)"
file_HI = file_path_HI & "Netw_test"
file_AL = file_path_AL & "Netw_test"
file_CO = file_path_CO & "Netw_test"
If fs.dir(file_HI)="Netw_test" And fs.dir(file_AL)="Netw_test" And fs.dir(file_CO)="Netw_test" Then
SmartTags("Netwerk_Ok") = 0
Else
SmartTags("Netwerk_Ok") = 1
End If
It detects when there is no connection, but after the connection is physically repaired, the alarm doesn't dissapear, Netwerk_Ok remains high in other words...