RobotStudio event

Logon w/DefaultUser at Operator

Options

Hello,

I am trying to set the default user's authorizations so that it is an operator level.  My customer wants the controller to boot with operator level access instead of with full access which the default user comes as.  The following code, almost identical to the User Guide, will work as long as the default user has full access authorizations.  If the default user does not have full access I get a "Object refernce not set to an instance of an object" error.  The error occures at the

Me.controller = ControllerFactory.CreateFrom(controllerInfo)

line.  So I don't even have the chance to set the user and stuff.  Robot Studio Online handles this setup fine so I would think I should be able to do it also.


 
Private
Sub ListView1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.DoubleClick
Dim item As ListViewItem = Me.ListView1.SelectedItems(0)
Dim stName As String
Dim stPassword As String
If Not item.Tag Is Nothing Then
Dim controllerInfo As ControllerInfo
controllerInfo =
DirectCast(item.Tag, ControllerInfo)
If controllerInfo.Availability = Availability.Available Then
If Not Me.controller Is Nothing Then
Me.controller.Logoff()
Me.controller.Dispose()
Me.controller = Nothing
End If
Try
Me.controller = ControllerFactory.CreateFrom(controllerInfo)
If MessageBox.Show("Default user?", "Login as", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
Me.controller.Logon(UserInfo.DefaultUser)
Else
stName = InputBox(
"Name", "Login")
stPassword = InputBox(
"Password", "Login")
Dim AUserInfo As UserInfo = New UserInfo(stName, stPassword)
  Me.controller.Logon(AUserInfo)
End If
Catch ex As Exception
MsgBox(ex.InnerException.Message)
End Try
End If
Else
MessageBox.Show(
"Selected controller not available.")
End If
End Sub
End
Class

 

I am using RAB v5.09, Windows XP Sp2.

Thank You,

Ted

Comments

  • RussD
    Options

    Why wouldn't you just use RSO to create users and groups that meet your requirements, and then reduce the access level of the Default User?

    Russell Drown
  • tnixon
    Options

    I was doing it the way you suggested.  The problem is my VB.net program cannot log in to the controller unless the Default User has full access.  If the Default User does not have full access it gives me an "Object reference not set to an instance of an object" error when the controller is created in the code which occurs before I can log in.

    I don't know if there is some way to logging in as a different user before creating the controller?  Do I need to create the controller differently? 

    Thanks,

    Ted

  • Ingela
    Options

    Hello,

    I believe this is an error in RAB 5.09, which was corrected in RAB 5.10. If you install RAB 5.10 (follow link on top of RAB User Forum) I think you should be able to do what you want. (RAB 5.10 has full compatibility with RAB 5.09 and RW 5.09)

    (There might still be a problem if your PC SDK application, which is running without full access, needs to access and show e-log messages. This was an error in RobotWare, which was corrected in RW 5.09.02.)

    I hope this will help you,

    Best regards,

    Ingela Brorsson
    Software Engineer
    ABB Robotics, Sweden