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.
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...
Code:
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 = "[URL="file://\\PLC_102\HISTORIAN\"]\\PLC_102\HISTORIAN\[/URL]"
file_path_AL = "[URL="file://\\PLC_102\ALARMS\"]\\PLC_102\ALARMS\[/URL]"
file_path_AL = "[URL="file://\\PLC_102\CORRECTIES\"]\\PLC_102\CORRECTIES\[/URL]"
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...
Last edited: