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.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings