IS controler started in VB

How can i in VB check if a controler is started or not.
Have read the API doc but can’t find anything under proberties to ActiveStation.Mechanisms

Best regards Klaus

Hi Klaus

Here comes an example how to check if controller is started.

Sub ControllerStatus()
Dim m As Mechanism
Dim c As ABBS4Controller

On Error Resume Next

Set m = ActiveMechanism
Set c = m.Controller
If c Is Nothing Then
MsgBox “Controller not Started”
Else
MsgBox “Controller Started”
End If
End Sub

Here is another example

Function isTheControllerStarted(irb As Mechanism) As Boolean

Dim c As ABBS4Controller

isTheControllerStarted = False

On Error GoTo errController:

Set c = irb.Controller
isTheControllerStarted = True

Exit Function

errController:

End Function