Sample VB6 Files PROBLEM - RESOLVED [WebWare SDK]
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 Engineer0
- 
            '************************************************************************* 
 '
 ' 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 SubPrivate Sub Form_Load() 
 
 Label4.Caption = Str(Helper1.AliasListCount)
 
 End SubFunction 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--------
 010001110
- 
            You must have a profile called "ROBOT" created before trying to run the application.Russell Drown0
- 
            Thx, it worked.--------
 010001110
Categories
- All Categories
- 5.6K RobotStudio
- 401 UpFeed
- 21 Tutorials
- 15 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 363 IRC5
- 80 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 853 RAPID Programming
- 30 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 110 Collaborative Robots
- 5 Job listings


