RobotStudio event

Connect / Disconnect from/to robot [WebWare SDK]

Hello there. I have a question according to general communication matters.

Robots used: S4, S4C+, IRC5 with Ethernet Option enabled (robots are pingable)

Dev: VB6 with SDK3.2 and Interlink 3 installed

Dest.: PC with VB6-runtimes and installation of our app + Interlink 4

I am planning to use the app on more than one machines (PC) at the same time.

In the manner of communication, you generaly do this:

1) set up the communication
2) connect
3) do some things
4) disconnect

Does Webware support such things? Maybe that's a stupid question, but I've been searching for a long time in the documentation and I did not find what I was searching for.

Could someone provide some code-fragments?

thx in advance

--------
01000111

Comments

  • The common behaviour is having the SDK application running on the a machine where Interlink is always connected to the Robot.

    However if you have a need to run multiple SDK applications on seperate machine, communicating with the same robot, you should disconnect the Interlink session for a given robot. 

    Basically, it is recommended that only one Interlink session at a time should be used for an individual S4 robot.

    ______________________________
    Anders Dannberg
    ABB Automation Technologies
    Support Engineer

    AndersD38400,3798726852
  • You said, only one app should be connected. Is there a possibility to check, if another InterLink is connected to the robot?

    If not, i would have to place an "authorisation"-server, which synchronizes the connections.

    The main purpose of our app is to periodicaly backup files from the robot.

    I do the following @ the moment

     '**************************************************
     '   author: Mathias Richter
     '     date: 2005-02-16
     ' function: lists all available Interlink ALIASes
     '           in debug-window
     '**************************************************
     Dim i_Counter As Integer
     Dim i_ErrorCodeABB As Integer
     Debug.Print "Displaying all Alias in INTERLINK (" & ABBHelper.AliasListCount & ")"
     For i_Counter = 0 To ABBHelper.AliasListCount - 1
      Debug.Print "Alias[" & i_Counter & "]" & ABBHelper.AliasList(i_Counter)
     Next i_Counter
     '**************************************************
     '   author: Mathias Richter
     '     date: 2005-02-16
     ' function: connect to a ALIAS (ABB-Robot)
     '           checks Interlink for valid ALIAS
     '           returns connectionstate in debug-window
     '       in: index
     '  remarks: index directly addresses the ALIAS
     '           see: ListAllAlias
     '           check aliasIndex <=?=> aliasName wanted
     '**************************************************
     Debug.Print "connecting to ALIAS(0)"
     If 0 > ABBHelper.AliasListCount - 1 Then
      MsgBox "Alias nicht in Liste!"
     End If
     ABBHelper.Robot = ABBHelper.AliasList(0)
     Select Case ABBHelper.InterfaceState
      Case ABB_Connected: Debug.Print "Connection established"
      Case ABB_Disconnected: Debug.Print "Connection failed: disconnected"
      Case ABB_Halted: Debug.Print "Connection halted by Interlink"
      Case ABB_NoAliasInList: Debug.Print "Alias not found"
      Case ABB_Simulated: Debug.Print "Connection simulated"
     End Select
     '**************************************************
     '   author: Mathias Richter
     '     date: 2005-02-16
     ' function: test
     '**************************************************
     Debug.Print "Testing environment"
     Debug.Print "done testing"
     '**************************************************
     '   author: Mathias Richter
     '     date: 2005-02-16
     ' function: disconnect from ALIAS (ABB-Robot)
     '**************************************************
     Debug.Print "disconnecting from ALIAS('" & ABBHelper.Robot & "')"
     If (ABBHelper.InterfaceState = ABB_Disconnected) Or _
        (ABBHelper.InterfaceState = ABB_NoAliasInList) Then
      MsgBox "Error: no connection"
     End If
     ABBHelper.Robot = ""
     Select Case ABBHelper.InterfaceState
      Case ABB_Connected: Debug.Print "Connection stil alive"
      Case ABB_Disconnected: Debug.Print "Connection disconnected"
      Case ABB_Halted: Debug.Print "Connection halted by Interlink"
      Case ABB_NoAliasInList: Debug.Print "Connection terminated"
      Case ABB_Simulated: Debug.Print "Connection stil simulated"
     End Select

    By dooing so, is the communication to the robot closed? Or do I have to do more? If so, could you give me hints/code-fragments?

     

     

    --------
    01000111
  • How do you actually check if the robot is in stopped state and not in start state? Need to check this before I allow programchange.
  • You can use the events of the Helper control to check the state or the robot and program states. Please see StatusChanged Event in the SDK manual for more details where the different state definitions are defined.

    ______________________________
    Anders Dannberg
    ABB Automation Technologies
    Support Engineer

     

  • [QUOTE=Svempa62]How do you actually check if the robot is in stopped state and not in start state? Need to check this before I allow programchange.[/QUOTE]

    Well, I changed my strategy and dynamicaly add / remove the Interlink alias, some example is available from AndersD I think in this forum.

    But in general the Interface-property is the right signal to trigger the state of the robot (if InterLink can connect to the robot).

    --------
    01000111