Mit Flex Dienste und/oder Prozesse abfragen

Johannes F

Level-1
Beiträge
232
Reaktionspunkte
9
Zuviel Werbung?
-> Hier kostenlos registrieren
ich habe ein problem mit einer visualisierung auf welcher zwei opc-server laufen, einer ist von felx und ein anderer ist von pilz.
mein problem ist das der pilz opc server so wie es z.z ausschaut ab und an einfach nicht mehr läuft, ich benötige ihn nur um die sicherheits-cpu zu diagnostizieren.

nun meine frage, gibt es eine möglichkeit mit hilfe eines skripts oder ähnlichem dienste oder prozesse auf ihren status abzufragen und dann einfach in der visu als rote- oder grünefläche anzuzeigen?
 
Zuviel Werbung?
-> Hier kostenlos registrieren
abfrage und evtl. starten. ich kann es z.z. nicht genau sagen ob der opc-server als dienst oder prozess installiert wurde. bin am di. wieder mit einem servicetechniker von pilz an der anlage beim kunden und würde es dann einbinden wollen.
wenn du etwas für mich als muster hast dann würde ich mich über eine info freuen :ROFLMAO:
 
Hier mal eine Anregung

Musst das Skript halt zyklisch aufrufen bzw aus der Steuerung aufrufen...
Übergabe an die Skripte ist die Variable "Name". Kannst aber auch fest eintragen. Hoffe es hilft...

'Programm beenden
'
Dim wmi, system, process
Set wmi = GetObject("winmgmts:")
Set system = wmi.instancesOf("win32_process")
For Each process In system
If LCase(process.name) = Name Then
process.Terminate (0)
End If
Next

--------------------------------------------------------

' Programm starten
'
' object.Run (Command [, WindowStyle] [, WaitOnReturn])
'
' WindowStyle
' 0 Hides the window And activates another window.
' 1 Activates And displays a window. If the window Is minimized Or maximized, the system restores it To its original size And position. An application should specify this flag when displaying the window For the first Time.
' 2 Activates the window And displays it as a minimized window.
' 3 Activates the window And displays it as a maximized window.
' 4 Displays a window In its most recent size And position. The active window remains active.
' 5 Activates the window And displays it In its current size And position.
' 6 Minimizes the specified window And activates the Next top-level window In the Z order.
' 7 Displays the window as a minimized window. The active window remains active.
' 8 Displays the window In its current state. The active window remains active.
' 9 Activates And displays the window. If the window Is minimized Or maximized, the system restores it To its original size And position. An application should specify this flag when restoring a minimized window.
' 10 Sets the show state based On the state of the program that started the application.
'
' WaitOnReturn
' True = Es wird auf das Programmende gewartet
'
Dim WshShell, Aktiv
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run Name, 1, False
 
Zurück
Oben