RobotStudio event

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
Best Regards

Klaus Soenderhegn
www.cadalysator.dk

Comments

  • 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

     

    Per Svensson
    Company Specialist
    ABB Automation Technology Products
  • 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
    /Martin Lundh
    Product manager
    ABB Robotics