RobotStudio event

Sample VB6 Files PROBLEM - RESOLVED [WebWare SDK]

I got some problem with the profilegen.vbp sample-file.

I get a error: -530. Could someone help?

mathric38400,3186342593
--------
01000111

Comments

  • -530 means "A reference has been made to an invalid or missing Profile." Please verfiy that you are refering to a correct profile in your code.

    ______________________________
    Anders Dannberg
    ABB Automation Technologies
    Support Engineer

     

  • '*************************************************************************
    '
    '   Name:       varsub.vbp
    '
    '   Author:     Russell Drown
    '               ABB Flexible Automation
    '               New Berlin, WI USA
    '
    '   Purpose:    This application will create Interlink aliases programmatically,
    '               based upon a "seed" value and the number of aliases desired. For
    '               instance, if you supply a seed value such as "robot" and choose
    '               to create 5 aliases, you will get robot0, robot1...robot4. This
    '               application only demonstrates the usage of the alias and profile
    '               COM objects on a local machine; for a real plant, add logic to
    '               create IP addresses dynamically.
    '
    '   Date:       December 22, 2003
    '
    '   Revisions:  12-22-03 Initial Release
    '
    '*************************************************************************

     

    Private Sub Command2_Click()
        Dim strAliasName As String
        Dim intRetVal As Integer
        Dim intNumAliases As Integer
        Dim i As Integer
       
        intNumAliases = Text2.Text
        strAliasName = Text1.Text
        For i = 0 To intNumAliases - 1
            strAliasName = Text1.Text & i
            intRetVal = CreateList(strAliasName)
        Next i
        If intRetVal = 0 Then
            MsgBox ("Success")
        Else
            MsgBox ("Failure " & Str(intRetVal))
        End If
    End Sub

    Private Sub Form_Load()
           
        Label4.Caption = Str(Helper1.AliasListCount)
       
    End Sub

    Function CreateList(ByVal strAliasName As String) As Integer
        'creates a new alias from the string parameter it receives
        Dim aAlias As New InterlinkAlias
        Dim aAliasCfg As New AliasConfig
        Dim pProfile As New Profile
        Dim pProfileCfg As New ProfileConfig
        Dim intVarCount, intRetVal As Integer
       
        aAliasCfg.Profile = "ROBOT"
        aAliasCfg.Address = "localhost"
        intRetVal = aAlias.SetAliasCfg(strAliasName, aAliasCfg) 'try to get config
        Label4.Caption = Str(Helper1.AliasListCount)
        CreateList = intRetVal
    End Function

    --------
    01000111
  • You must have a profile called "ROBOT" created before trying to run the application.
    Russell Drown
  • Thx, it worked.
    --------
    01000111