PDA

View Full Version : check networkconnection in wincc flex


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...

sylent
April 6th, 2009, 08:23 AM
Are you running this on a panel???? The VBA sxripting commands are different in a WindowsCE environment versus runtime on a PC.

Combo
April 10th, 2009, 08:50 AM
Hi,

I know, and I'm using CE commands.

Are you running this on a panel???? The VBA sxripting commands are different in a WindowsCE environment versus runtime on a PC.