RobotStudio event

DeviceNames/Download to hdd # RESOLVED [WebWare SDK]

Hi again!

In the manual I did not find a list of valid device-names. Could someone help? What devicenames mean what on IRC5/S4C/S4C+??

also, how do I specify the target of an operation to the local disc?
(I mean f.e. backup a file from S4C+ to local hdd). Do I need NFS/FTP? Can I also do it via S4 commands?

I got a lot of questions, I know. I hope someone could help.

Maybe some code-fragments will help to understand how to do this kind of stuff.

If all is done, i will post an new Topic with all the needed code-fragments.

thx in advance

mathric38404,3214236111
--------
01000111

Comments

  • Hello,

    There is a list of File system references in the WebWare SDK Help.

    Please check: Contents tab -> WebWare ActiveX Control Library -> ActiveX Controls ->Helper Control -> Robot Controller File System Reference.

    Methods such as S4Backup will perform a robot backup to the robot memory device only. If you want to transfer files from robot <-> PC, you should use the Helper methods such as S4FileCopy or use the File Manager control

    ______________________________
    Anders Dannberg
    ABB Automation Technologies
    Support Engineer

  • It Still does not work.

    I did the following ....

     '**************************************************
     '   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"
     Dim i_ResultSpec As Integer
     Dim i_DirMode As Integer
     Dim l_ResultID As Long
     i_ResultSpec = 3
     i_DirMode = 0              'nicht implementiert und somit 0
     l_ResultID = 0
     GetDevicesPresentABB
     'Alle Ordner im Hauptordner anzeigen
     Debug.Print ABBHelper.ErrorMessage(ABBHelper.S4Dir(ABBHelper.DevList(0), s_Path, i_DirMode, i_ResultSpec, l_ResultID))
     Debug.Print "listing all directorys:"
     For i_Counter = 0 To ABBHelper.DirListCount - 1
      Debug.Print "Dir(" & i_Counter & "):'" & ABBHelper.DirList(i_Counter) & "'"
     Next i_Counter
     'Alle Dateien im Hauptordner anzeigen
     Debug.Print "listing all files"
     For i_Counter = 0 To ABBHelper.FileListCount - 1
      Debug.Print "File(" & i_Counter & "):'" & ABBHelper.FileList(i_Counter) & "'"
     Next i_Counter
     Debug.Print ABBHelper.S4FileCopy(ABBHelper.DevList(0), ABBHelper.FileList(0), App.Path & "BackupABB", ABBHelper.FileList(0), 0, l_ResultID)
     Debug.Print ABBHelper.ErrorMessage(ABBHelper.S4FileCopy(ABBHelper.DevList(0), ABBHelper.FileList(0), App.Path & "BackupABB", ABBHelper.FileList(0), 0, l_ResultID))
     Debug.Print ABBHelper.ErrorMessage(ABBHelper.S4Dump(App.Path & "BackupABB.Dump", 0, l_ResultID))
     
     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
     'ABBHelper.
     End

    the routine getdevices ...

    Public Sub GetDevicesPresentABB()
    '**************************************************
    '   author: Mathias Richter
    '     date: 2005-02-16
    ' function: get the devicenames from the robot-
    '           controller
    '  remarks: displays devicenames in direct-window
    '**************************************************
     Dim i_ResultSpec As Integer
     Dim l_ResultID As Long
     frmTest.ABBHelper.S4GetFileDevInfo 0, l_ResultID
     Debug.Print "Displaying devices present (" & frmTest.ABBHelper.DevListCount & ")"
     For i_Counter = 0 To frmTest.ABBHelper.DevListCount - 1
      Debug.Print "Dev(" & i_Counter & "):'" & frmTest.ABBHelper.DevList(i_Counter) & "'"
     Next i_Counter
    End Sub

    my output is:

    Displaying all Alias in INTERLINK (3)
    Alias[0]S4VIRTCRTL
    Alias[1]S4VIRTCTRL
    Alias[2]ROBOT
    connecting to ALIAS(0)
    Connection established
    Testing environment
    Displaying devices present (1)
    Dev(0):'ram1disk:'
    Unknown Error
    listing all directorys:
    Dir(0):'..'
    Dir(1):'BACKUP'
    Dir(2):'home'
    Dir(3):'syspar'
    Dir(4):'SYSTEM'
    listing all files
    File(0):'AAAH.prg'
    File(1):'base_mt.sys'
    File(2):'ctrl.bin'
    File(3):'image.bin'
    File(4):'katakan.tpu'
    File(5):'key.id'
    File(6):'keystr.txt'
    File(7):'mode.sav'
    File(8):'opt_l0.cmd'
    File(9):'pgmcpl1.log'
    File(10):'program.id'
    File(11):'ROBOT~1.ROB'
    File(12):'startup.cmd'
    File(13):'SYSPAR.LOG'
    File(14):'SYSTEM~1'
    File(15):'user.sys'
     0
    Unknown Error
    Unknown Error
    done testing
    disconnecting from ALIAS('S4VIRTCRTL')
    Connection terminated

    All S4Filecopy and S4Dump return the code 0, but when I look into the directory it is still empty

    what did I wrong?

    --------
    01000111
  • Are you communicating with a real robot or a Virtual Controller?

    You are trying to save the backup generated by S4Dump on a local PC, which is not a supported behaviour. You can use the S4Dump & S4Backup methods on the the robots memory device only.

    For instance, try the following:
    =======================================
    Dim intTest As Integer
    Dim lngResult As Long
    intTest = AxHelper1.S4Dump("robotdir", 3, lngResult)
    =======================================

    Also, as long as you are using the value 0 as a ResultSpec, you will not recieve proper error messages (see my previous post on ResultSpec codes).

    Are you sure that the path is correct when copying the file?

    ______________________________
    Anders Dannberg
    ABB Automation Technologies
    Support Engineer

  • Okay i found the error:

    devicename is "ram1disk:"

    app.path is "c:abbackup"

    both have to be ended by "" so i modyfied like this:

    Debug.Print ABBHelper.S4FileCopy(ABBHelper.DevList(0) & "", ABBHelper.FileList(0), App.Path & "", ABBHelper.FileList(0), 3, l_ResultID)

    both works fine.image

    --------
    01000111