# Help plz! Dont find whats wrong!

**URL:** <https://tech-community.robotics.abb.com/t/help-plz-don-t-find-what-s-wrong/1416>\
**Category:** Developer Tools\
**Created:** [August 31, 2007, 6:42pm UTC](https://tech-community.robotics.abb.com/t/help-plz-don-t-find-what-s-wrong/1416 "2007-08-31T18:42:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tedenljung](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@Tedenljung](https://tech-community.robotics.abb.com/u/Tedenljung)\
**Post date:** [August 31, 2007, 6:42pm UTC](https://tech-community.robotics.abb.com/t/help-plz-don-t-find-what-s-wrong/1416/1 "2007-08-31T18:42:17Z")

</div>

Hello everybody!

I’m new to RAB and trying to get my code to work but have problem to find whats wrong with it. Easy to find for someone that have worked longer with RAB I guess :stuck\_out\_tongue\_winking\_eye:.

Im in hurry to get the basic to work, I will use RAB next Friday on a company show. Plz help!

Attach my project.

/Daniel

[2007-08-31\_184001\_ModifySample.zip](http://forums.robotstudio.com/webwiz/Tedenljung/2007-08-31_184001_ModifySample.zip)

---

<div class="post-metadata">

**Author:** ![RussD](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@RussD](https://tech-community.robotics.abb.com/u/RussD)\
**Post date:** [August 31, 2007, 8:09pm UTC](https://tech-community.robotics.abb.com/t/help-plz-don-t-find-what-s-wrong/1416/2 "2007-08-31T20:09:09Z")

</div>

Could you be more specific about what problem you are having?

---

<div class="post-metadata">

**Author:** ![Tedenljung](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@Tedenljung](https://tech-community.robotics.abb.com/u/Tedenljung)\
**Post date:** [September 1, 2007, 9:36am UTC](https://tech-community.robotics.abb.com/t/help-plz-don-t-find-what-s-wrong/1416/3 "2007-09-01T09:36:23Z")

</div>

The PC project is almost a copy of Read/Write example from the manual. But I have changed it to show the problem in a textbox. I just want to Read/Write to a Num or Array when the program is finished.

The problem is that I fill in Task, Module and valuename and dubbleclick on the robot in found robots. The only answer I get is “invalid client id”, whats wrong?

ABB.Robotics.GenericControllerException: Invalid client id.

at Adapters.Data.Get()

at ABB.Robotics.Controllers.RapidDomain.RapidData.get\_Value()

at ModifySample.BasicControllerForm.ListView1\_DoubleClick(Objec t sender, EventArgs e) in c:Visual Studio 2005ProjectsABBSamplesModifySampleModifySampleBasicCon trollerForm.vb:line 50

Real IRC5 controller version 5.09.01  
RAB version 5.09

I hope this is better info of the problem.

---

<div class="post-metadata">

**Author:** ![Tedenljung](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@Tedenljung](https://tech-community.robotics.abb.com/u/Tedenljung)\
**Post date:** [September 1, 2007, 7:44pm UTC](https://tech-community.robotics.abb.com/t/help-plz-don-t-find-what-s-wrong/1416/4 "2007-09-01T19:44:12Z")

</div>

Now I have fixed some other stuff but the main problem is still there!  
I Can’t get any value from the controller, I have now tested with both Virtual and Real Controller… Same problem, as post above.

Can somebody help?

Complete VB project:  
[2007-09-02\_133855\_ModifySample-3.zip](http://forums.robotstudio.com/webwiz/Tedenljung/2007-09-02_133855_ModifySample-3.zip)

---

<div class="post-metadata">

**Author:** ![Ari\_Suomela](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@Ari\_Suomela](https://tech-community.robotics.abb.com/u/Ari_Suomela)\
**Post date:** [September 5, 2007, 10:04am UTC](https://tech-community.robotics.abb.com/t/help-plz-don-t-find-what-s-wrong/1416/5 "2007-09-05T10:04:35Z")

</div>

Hello Daniel,

you need to logon the controller and then request mastership. Example added to your project:

Private Sub btGet\_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btGet.Click

Dim item As ListViewItem = Me.ListView1.SelectedItems(0)

Dim CtrlInfo As ControllerInfo

 

Dim myUserInfo As UserInfo = New UserInfo(“Default User”)

If Not item.Tag Is Nothing Then

CtrlInfo = DirectCast(item.Tag, ControllerInfo)

If Not CtrlInfo.Availability = Availability.Available Then

Return

End If

Me.Ctrl = ControllerFactory.CreateFrom(CtrlInfo)

End If

If Me.Ctrl Is Nothing Then Return

’ Codesample

Dim rd As ABB.Robotics.Controllers.RapidDomain.RapidData = Nothing

 

Ctrl.Logon(myUserInfo.DefaultUser)

Dim master As Mastership = Mastership.Request(Me.Ctrl.Rapid)

Try

rd = Ctrl.Rapid.GetRapidData(tbTask.Text, tbModule.Text, tbValue.Text)

If rd = Nothing Then

Return

End If

RichTextBox1.Clear()

RichTextBox1.Text = rd.Value.ToString

Catch ex As Exception

RichTextBox1.Clear()

RichTextBox1.Text = ex.ToString

Finally

If Not rd Is Nothing Then

rd.Dispose()

rd = Nothing

End If

End Try

 

Ctrl.Logoff()

End Sub

/Ari.

---

<div class="post-metadata">

**Author:** ![Tedenljung](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@Tedenljung](https://tech-community.robotics.abb.com/u/Tedenljung)\
**Post date:** [September 13, 2007, 1:40pm UTC](https://tech-community.robotics.abb.com/t/help-plz-don-t-find-what-s-wrong/1416/6 "2007-09-13T13:40:49Z")

</div>

Do you have to logon to the controller both for Reading and writing values to controller? In the samples in RAB 5.09 manual no login is done for reading… I think that ABB should check the samples so they really work. Couse it will be a really good help to beginners.

---

<div class="post-metadata">

**Author:** ![Danny\_Rus](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@Danny\_Rus](https://tech-community.robotics.abb.com/u/Danny_Rus)\
**Post date:** [September 20, 2007, 4:23pm UTC](https://tech-community.robotics.abb.com/t/help-plz-don-t-find-what-s-wrong/1416/7 "2007-09-20T16:23:56Z")

</div>

You dont need to take mastership, but you need to be logged on to the controller.
