check networkconnection in wincc flex

userxyz

Member
Join Date
May 2002
Location
any
Posts
2,768
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.


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:
Are you running this on a panel???? The VBA sxripting commands are different in a WindowsCE environment versus runtime on a PC.
 

Similar Topics

Hello all, I have a Controllogix 1756-L61 with some RIO. There are a couple of 1734-OB4E's that have gone bad. (no output voltage) My boss found...
Replies
10
Views
1,086
Hello I am new here and new to PLC's, I wrote this program for a class that I am taking and my local tech school. The description is switch 7 will...
Replies
0
Views
422
Hello I am new here and new to PLC's, I wrote this program for a class that I am taking and my local tech school. The description is switch 7 will...
Replies
10
Views
1,993
I'm trying to save a project as an L5X and I need to uncheck the "Encode Source Protected Content" checkbox, but it's grayed out. How do I get...
Replies
1
Views
950
Hello. I have been working on my first plc project for a while now. I just ordered all the parts that I need and before I did that, I created the...
Replies
10
Views
2,054
Back
Top Bottom